jaredrummler / Cyanea

A theme engine for Android
Apache License 2.0
1.45k stars 144 forks source link

Background color for default theme is always white #64

Closed maxpilotto closed 5 years ago

maxpilotto commented 5 years ago

Whenever I fetch programmatically the backgroundColorDark and Light they're respectively white and gray, my activity has the theme Theme.Cyanea.Dark.NoActionBar. The ?colorBackgroundDark and ?colorBackgroundLight seem to work fine

maxpilotto commented 5 years ago

This appears to be an issue only with the default theme, is there a way to set the current theme outside of the picker activity?

maxpilotto commented 5 years ago

A workaround is to set one of the themes in the file the first time the app runs.
E.g.

List<CyaneaTheme> list = CyaneaTheme.Companion.from(getAssets(), "themes/cyanea_themes.json");

list.get(0).apply(Cyanea.getInstance()).recreate(this);
maxpilotto commented 5 years ago

I ended up making my own theme manager, which doesn't work dynamically but at least is something