首页 文章

Codename One右侧菜单阴影被翻转

提问于
浏览
2

我注意到使用最新版本的Codename . 当我的sidemenu(汉堡菜单)在右侧时,阴影图像被翻转 .
似乎是在模拟器和Android和iOS上的情况 .
我似乎记得我不得不在最近完成这项工作,但这种解决办法似乎不再起作用了 . 我尝试使用主题常量替换imahe,并通过将sideMenuShadowBool设置为false来关闭它 . 但这些似乎都没有做任何事情 .

截图:

enter image description here

代码片段(在每个表单的beforeShow上调用):

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);
}

1 回答

  • 0

    这个问题应该得到解决,并将在本周五(2016年6月3日)发布

相关问题