Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

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);
  }
  
Comment

PREVIOUS NEXT
Code Example
Java :: Duration class java 
Java :: java parseint 
Java :: how to find location of java jdk 
Java :: array.sort in java 
Java :: Get the last day of a month in Java 
Java :: last char in string java 
Java :: java get number out of string 
Java :: Simple gui in java 
Java :: generate serial uuid with intelij 
Java :: how to move a marker on google maps in android studio 
Java :: How to build a Sudoku solver, in Java? 
Java :: java unit test an api 
Java :: array input java 
Java :: useColorScheme returning light 
Java :: how to find the size of a queue in java 
Java :: how to update java on windows 10 
Java :: java sum of array elements 
Java :: send action bar message bukkit 
Java :: current time in long java 
Java :: how to center a window in java 
Java :: arraylist .set java 
Java :: java wait for user input 
Java :: java program for multiplication table 
Java :: method resolve file in java 
Java :: restart java windows 
Java :: reverseString 
Java :: Java heap retention in BodyContentImpl 
Java :: java check if path exists 
Java :: how to get current time and date in android 
Java :: java if statement 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =