changing theme makes titlebar disappear

14 views
Skip to first unread message

howud...@gmail.com

unread,
Jul 25, 2016, 5:18:44 PM7/25/16
to CodenameOne Discussions
I have added the following themes to my res file: "Native", "Blue", "Chrome", "Dark", "Green"
I change the theme with the below code, and when I do, the theme changes just fine, but the title bar of the Frame ("Settings") disappears
protected void onSave() {
Preferences.set("theme", cmbTheme.getSelectedString());
Resources res = null;
try {
res = Resources.openLayered("/theme");
} catch (IOException e) {
MessageBox.OK("Error", e.toString());
}
if (res != null) {
UIManager.getInstance().setThemeProps(res.getTheme(Preferences.get("theme", "Native")));
Display.getInstance().getCurrent().refreshTheme();
}
}




Shai Almog

unread,
Jul 26, 2016, 12:04:59 AM7/26/16
to CodenameOne Discussions, howud...@gmail.com
I have rather similar code in our theme section of an upcoming demo and it doesn't produce such an issue so I'm guessing there is either something in the theme or elsewhere in the app that triggers this.
Reply all
Reply to author
Forward
0 new messages