Refactor theme preference values into constants

Also explicitly set a theme via preference updating to the default.
This commit is contained in:
Thialfihar
2015-07-04 19:30:25 +02:00
parent 8d2cd33339
commit 86d95e4d40
4 changed files with 14 additions and 4 deletions

View File

@@ -221,7 +221,7 @@ public class Preferences {
}
public String getTheme() {
return mSharedPreferences.getString(Pref.THEME, "light");
return mSharedPreferences.getString(Pref.THEME, Pref.Theme.LIGHT);
}
public void setTheme(String value) {
@@ -390,6 +390,10 @@ public class Preferences {
}
// fall through
case 4: {
// fall through
}
case 5: {
setTheme(Constants.Pref.Theme.LIGHT);
}
}