onboarding-examples-android
onboarding-examples-android copied to clipboard
placeholder UI and multiple themes
Hi,
Not sure if you still watch this repo, but I'd like ask a question that I can't figure out.
In my app I have two themes, a dark and a light one. The user can choose which one suits the needs and the app will use that one. Since it is not possible to set this in XML (which one is actually in use) I start all my activity with setting the correct them using setTheme() based on a value stored in sharedprefs. In the manifest I have to declare which theme to use, so one of these themes is the "default" one, light, in my case. This is all good, but when the app is started from a cold start and if the dark theme was selected by the user previously then until the UI is created and theme is set the light theme's colors are used (as in the manifest that is what is set, and setTheme is only called if most of the work is done).
Is there a way to overcome this?
Thanks!
It might be possible that you already found a solution but one that I found was to use activity-alias to point the launcher intent to the correct category theme. I concur it might not be the prettiest but here's an example I made: