Arunraj Govindasamy
Arunraj Govindasamy

Reputation: 113

Codename one Theme Layering Works

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

Answers (1)

Shai Almog
Shai Almog

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

Related Questions