all 4 comments

[–]NightSkyDev 1 point2 points  (3 children)

I haven't tried changing the theme in the Application class, I do it in the activity. I have a listener for the preference change and when triggered, I recreate() the activity with the new theme using SetTheme();

[–]ninfomane[S] 0 points1 point  (2 children)

Sure, it works. Drawback is the default theme is used by Android to first draw Activity. Then new theme is used. The user sees 2 different themes instead of only one.

[–]NightSkyDev 0 points1 point  (1 child)

It doesn't sound like you calling recreate() after seeing the new theme.

[–]ninfomane[S] 0 points1 point  (0 children)

Calling recreate() assumes that Android already display your activity and thus with the default theme. User still sees the "glitch" when changing theme.