I assume that you save the theme selected by the user in the application settings. So, in your activity onCreate()add setTheme().
public void onCreate(Bundle savedInstanceState) {
setTheme(android.R.style.Theme);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_second);
}
But the changes do not take effect until the activity is restarted. Therefore, if you need to immediately apply theme changes, call recreate()after applying the theme:
setTheme(userSelectedTheme);
recreate();
, Attiq, , Threads/AsyncTasks, .
user4320521