From 873227a48e547f90493795a9d9e8afce95b47e97 Mon Sep 17 00:00:00 2001 From: uykek Date: Mon, 7 Sep 2020 11:26:21 +0200 Subject: [PATCH] Fix bug in the GameActivity that caused problems with the dark mode theme --- .../org/secuso/privacyfriendlysudoku/ui/GameActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/GameActivity.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/GameActivity.java index 854ebe7..8a7c520 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/GameActivity.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/GameActivity.java @@ -138,6 +138,11 @@ public class GameActivity extends BaseActivity implements NavigationView.OnNavig */ if (sharedPref.getBoolean("pref_dark_mode_setting", false )) { 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 { AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); }