File tree 4 files changed +6
-6
lines changed
4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ protected void onCreate(Bundle savedInstanceState) {
24
24
getDelegate ().installViewFactory ();
25
25
getDelegate ().onCreate (savedInstanceState );
26
26
// Check prefs on every activity starts
27
- if (PreferenceManager .getDefaultSharedPreferences (this ).getBoolean ("theme" ,false )) {
27
+ if (PreferenceManager .getDefaultSharedPreferences (this ).getBoolean ("theme" ,true )) {
28
28
setTheme (R .style .DarkAppTheme );
29
29
}else {
30
30
setTheme (R .style .LightAppTheme ); // default
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ public class BaseActivity extends Activity {
13
13
14
14
@ Override
15
15
protected void onCreate (Bundle savedInstanceState ) {
16
- if (PreferenceManager .getDefaultSharedPreferences (this ).getBoolean ("theme" ,false )) {
16
+ if (PreferenceManager .getDefaultSharedPreferences (this ).getBoolean ("theme" ,true )) {
17
17
currentTheme = true ;
18
18
setTheme (R .style .DarkAppTheme );
19
19
}else {
@@ -26,7 +26,7 @@ protected void onCreate(Bundle savedInstanceState) {
26
26
@ Override
27
27
protected void onResume () {
28
28
// Restart activity if theme is changed
29
- boolean newTheme = PreferenceManager .getDefaultSharedPreferences (this ).getBoolean ("theme" ,false );
29
+ boolean newTheme = PreferenceManager .getDefaultSharedPreferences (this ).getBoolean ("theme" ,true );
30
30
if (currentTheme !=newTheme ){ // is activity theme changed
31
31
Intent intent = getIntent ();
32
32
finish ();
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ public class BaseAppCompatActivity extends AppCompatActivity {
12
12
13
13
@ Override
14
14
protected void onCreate (Bundle savedInstanceState ) {
15
- if (PreferenceManager .getDefaultSharedPreferences (this ).getBoolean ("theme" ,false )) {
15
+ if (PreferenceManager .getDefaultSharedPreferences (this ).getBoolean ("theme" ,true )) {
16
16
currentTheme = true ;
17
17
setTheme (R .style .DarkAppTheme );
18
18
}else {
@@ -25,7 +25,7 @@ protected void onCreate(Bundle savedInstanceState) {
25
25
@ Override
26
26
protected void onResume () {
27
27
// Restart activity if theme is changed
28
- boolean newTheme = PreferenceManager .getDefaultSharedPreferences (this ).getBoolean ("theme" ,false );
28
+ boolean newTheme = PreferenceManager .getDefaultSharedPreferences (this ).getBoolean ("theme" ,true );
29
29
if (currentTheme !=newTheme ){ //is activity theme changed
30
30
Intent intent = getIntent ();
31
31
finish ();
Original file line number Diff line number Diff line change 21
21
22
22
<CheckBoxPreference
23
23
android : title =" @string/preference_theme"
24
- android : defaultValue =" false "
24
+ android : defaultValue =" true "
25
25
android : summary =" @string/preference_theme_summary"
26
26
android : key =" theme" />
27
27
You can’t perform that action at this time.
0 commit comments