So ändern Sie das Thema der App in Android Studio programmatisch
So, to switch between themes dynamically you simply need to call
setTheme before super.onCreate like this:
public void onCreate(Bundle savedInstanceState) {
setTheme(android.R.style.Theme);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_second);
}
android developer