Answers for "how to change theme of app in android studio programmatically"

4

how to change theme of app in android studio programmatically

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);
  }
Posted by: Guest on November-06-2021

Code answers related to "how to change theme of app in android studio programmatically"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language