Fix bug in the GameActivity that caused problems with the dark mode theme
This commit is contained in:
parent
093c22e339
commit
873227a48e
1 changed files with 5 additions and 0 deletions
|
@ -138,6 +138,11 @@ public class GameActivity extends BaseActivity implements NavigationView.OnNavig
|
||||||
*/
|
*/
|
||||||
if (sharedPref.getBoolean("pref_dark_mode_setting", false )) {
|
if (sharedPref.getBoolean("pref_dark_mode_setting", false )) {
|
||||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
|
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
|
||||||
|
} else if (sharedPref.getBoolean("pref_dark_mode_automatically_by_system", false)) {
|
||||||
|
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM);
|
||||||
|
|
||||||
|
} else if(sharedPref.getBoolean("pref_dark_mode_automatically_by_battery", false)){
|
||||||
|
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY);
|
||||||
} else {
|
} else {
|
||||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
|
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue