代号One右侧菜单阴影被翻转 [英] Codename One Right side menu shadow is flipped

查看:79
本文介绍了代号One右侧菜单阴影被翻转的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到使用的是最新版的代号。
当我的菜单(汉堡菜单)在右侧时,阴影图像被翻转。

在模拟器以及Android和iOS上似乎是这种情况。
我似乎记得我最近不得不进行一些工作才能使其正常工作,但是该解决方法似乎不再有效。
我尝试使用主题常量替换imahe,并通过将sideMenuShadowBool​​设置为false将其关闭。

I've noticed using the latest build of Codename one. When my sidemenu (hamburger menu) is on the right hand side, the shadow image is flipped.
Seems to be the case on the simulator and Android and iOS.
I seem to remember I had to put in a work around to get this working recently, but that work-around doesn't seem to work anymore. I tried to replace the imahe using the theme constants, and also to turn it off by setting sideMenuShadowBool to false. but neither of these seem to do anything anymore.

截屏:

代码段(每种形式在beforeShow上调用):

Code snipit (called on beforeShow for each form):

private void setupTitleBar(Form f, FormController fc) {

    if (handler == null) {
        handler = new MenuHandler();
        sm.addCommandListener(handler);
    }

    for (int c = 0; c < f.getCommandCount(); c++) {
        f.removeCommand(f.getCommand(c));
    }

    Toolbar tb = new Toolbar();
    f.setToolbar(tb);

    fc.setupTitlebar(tb);
    String formName = f.getName();
    if (!"Main".equals(formName)
            && !"Signup".equals(formName)
            && !"MyCards".equals(formName)
            && !("Orders".equals(formName) && !ModuleManager.isModuleEnabled(ModuleManager.LOYALTY))) {

        Command back = new Command("", sm.getImage("back.png"), BACK);
        back.putClientProperty("TitleCommand", true);
        f.setBackCommand(back);

        tb.addCommandToLeftBar(back);

    }

    if (!"Main".equals(formName)
            && !"Signup".equals(formName)) {

        addSideCommand("Logout", "LogoutSideOption", LOGOUT, e->logoutUser(), tb);
        addSideCommand("View T&Cs", "TnCSideOption", TANDC, e->showTandCs(), tb);
        addSideCommand("Reset Tutorials", "TnCSideOption", CLEAR_TUTORIAL, e->clearTutorial(), tb);
    }
}

private void addSideCommand(String name, String udid, int commandID, ActionListener event, Toolbar tb) {
    Command command = new Command(name, null, commandID);
    command.putClientProperty(SideMenuBar.COMMAND_PLACEMENT_KEY, SideMenuBar.COMMAND_PLACEMENT_VALUE_RIGHT);
    Button comandLabel = new Button(name);
    comandLabel.setUIID(udid);
    command.putClientProperty(SideMenuBar.COMMAND_SIDE_COMPONENT, comandLabel);
    tb.addCommandToSideMenu(command);
    comandLabel.addActionListener(event);
}


推荐答案

此问题应得到解决,将于本星期五(2016年6月3日)发布

This issue should be resolved and will be in the release this Friday (June 3rd 2016)

这篇关于代号One右侧菜单阴影被翻转的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆