X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=src%2Fcom%2Fhughes%2Fandroid%2Fdictionary%2FDictionaryApplication.java;h=7ac45aeabfd2283ba590909a233c17dc044f86d3;hb=f8c9dec309c4934cf685d974bceeb159225acf1b;hp=fa4571c6483773b73ec6c2454c11295432b6e740;hpb=099a2b5ae0ec99b9aba69642c53a66c613268c57;p=Dictionary.git diff --git a/src/com/hughes/android/dictionary/DictionaryApplication.java b/src/com/hughes/android/dictionary/DictionaryApplication.java index fa4571c..7ac45ae 100644 --- a/src/com/hughes/android/dictionary/DictionaryApplication.java +++ b/src/com/hughes/android/dictionary/DictionaryApplication.java @@ -311,15 +311,15 @@ public enum DictionaryApplication { public Theme getSelectedTheme() { final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(appContext); - final String theme = prefs.getString(appContext.getString(R.string.themeKey), "themeLight"); + final String theme = prefs.getString(appContext.getString(R.string.themeKey), "themeSystem"); if (theme.equals("themeLight")) { return Theme.LIGHT; } else if (theme.equals("themeSystem")) { int mode = (appContext.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK); - return ((mode == Configuration.UI_MODE_NIGHT_YES) ? - Theme.DEFAULT : - Theme.LIGHT); + return ((mode == Configuration.UI_MODE_NIGHT_NO) ? + Theme.LIGHT: + Theme.DEFAULT); } else { return Theme.DEFAULT; }