OGeek|极客世界-中国程序员成长平台

标题: android - 代号一 右侧菜单阴影翻转 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 16:35
标题: android - 代号一 右侧菜单阴影翻转

我注意到使用的是 Codename one 的最新版本。 当我的侧边菜单(汉堡菜单)在右侧时,阴影图像会翻转。
在模拟器和安卓和iOS上似乎都是这样。
我似乎记得我最近不得不解决这个问题,但是这个解决方法似乎不再起作用了。 我尝试使用主题常量替换 imahe,并通过将 sideMenuShadowBool​​ 设置为 false 来关闭它。但这些似乎都不再做任何事情了。

截图:

enter image description here

代码 fragment (在每个表单的 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);
}



Best Answer-推荐答案


此问题应已解决,并将在本周五(2016 年 6 月 3 日)发布

关于android - 代号一 右侧菜单阴影翻转,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37475286/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4