Android runtime change switch Activity theme

static boolean mbThemeLight = false;
 
 @Override
    public void onCreate(Bundle savedInstanceState) {
         if(mbThemeLight)
        setTheme(android.R.style.Theme_Light);
        super.onCreate(savedInstanceState);
        // bla bla bla..........
    }
 
private void switchTheme(){
 mbThemeLight = true;
 this.recreate();
}
This entry was posted in Android Examples Code, Android Studio and tagged . Bookmark the permalink.


Comments are closed.

738 views