Use untranslatable string when storing theme

This fixes #30
This commit is contained in:
tonymanou
2017-01-04 23:11:09 +01:00
committed by topjohnwu
parent 93598d3a51
commit ef2e02098d
9 changed files with 23 additions and 9 deletions

View File

@@ -30,7 +30,7 @@ public class SettingsActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
String theme = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()).getString("theme", "");
Logger.dev("AboutActivity: Theme is " + theme);
if (theme.equals("Dark")) {
if (Utils.isDarkTheme(theme, this)) {
setTheme(R.style.AppTheme_dh);
}
@@ -123,7 +123,7 @@ public class SettingsActivity extends AppCompatActivity {
String theme = prefs.getString(key, "");
themePreference.setSummary(theme);
if (theme.equals("Dark")) {
if (Utils.isDarkTheme(theme, getActivity())) {
getActivity().getApplication().setTheme(R.style.AppTheme_dh);
} else {
getActivity().getApplication().setTheme(R.style.AppTheme);