Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
8enet committed May 5, 2017
1 parent e920843 commit df7aa06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions app/src/main/java/com/zzzmode/appopsx/ui/BaseActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ public class BaseActivity extends AppCompatActivity {
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
int themeMode = SpHelper.getThemeMode(this);
if(themeMode != AppCompatDelegate.MODE_NIGHT_AUTO) {
AppCompatDelegate.setDefaultNightMode(themeMode);
}
AppCompatDelegate.setDefaultNightMode(SpHelper.getThemeMode(this));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static int getThemeMode(Context context){
if(getSharedPreferences(context).getBoolean("pref_app_daynight_mode", false)){
return AppCompatDelegate.MODE_NIGHT_YES;
}
return AppCompatDelegate.MODE_NIGHT_AUTO;
return AppCompatDelegate.MODE_NIGHT_NO;
}

}

0 comments on commit df7aa06

Please sign in to comment.