1 package org.robolectric.testapp; 2 3 import android.app.Activity; 4 import android.os.Bundle; 5 6 /** A test activity that can customize the theme. */ 7 public class ActivityWithAnotherTheme extends Activity { 8 9 public static Integer setThemeBeforeContentView = null; 10 11 @Override onCreate(Bundle savedInstanceState)12 protected void onCreate(Bundle savedInstanceState) { 13 super.onCreate(savedInstanceState); 14 15 if (setThemeBeforeContentView != null) { 16 setTheme(setThemeBeforeContentView); 17 } 18 19 setContentView(R.layout.styles_button_layout); 20 } 21 } 22