How to change current Theme at runtime in Android
- by Guido
I've created a PreferenceActivity that allows the user to choose the theme he wants to apply to the entire application.
When the users selects a theme, this code is executed:
if (...) {
getApplication().setTheme(R.style.BlackTheme);
} else {
getApplication().setTheme(R.style.LightTheme);
}
But, despite I've checked with the debugger…