Как изменить тему приложения в Android Studio программно

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