Reputation: 113
How to use theme Layering in CodeName One ?
theme = UIManager.initNamedTheme("/theme", "Theme 1");
UIManager.getInstance().setThemeProps(theme.getTheme(theme.getThemeResourceNames()[1]));
I have instantiated the primary and secondary theme .
Upvotes: 1
Views: 48
Reputation: 52760
Assuming the first theme (0 in the array) is "Theme 1" which isn't guaranteed then changing your code from setThemeProps
to addThemeProps
will work.
Upvotes: 1