Here are the examples of the java api v.blade.ui.settings.ThemesActivity.setThemeToRed() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
8
Source : BladeApplication.java
with GNU General Public License v3.0
from Valou3433
with GNU General Public License v3.0
from Valou3433
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
// load saved theme
SharedPreferences generalPrefs = base.getSharedPreferences(SettingsActivity.PREFERENCES_GENERAL_FILE_NAME, Context.MODE_PRIVATE);
String theme = generalPrefs.getString("theme", null);
if (theme != null) {
if (theme.equalsIgnoreCase("nightly"))
ThemesActivity.setThemeToNightly();
else if (theme.equalsIgnoreCase("blade"))
ThemesActivity.setThemeToBlade();
else if (theme.equalsIgnoreCase("green"))
ThemesActivity.setThemeToGreen();
else if (theme.equalsIgnoreCase("red"))
ThemesActivity.setThemeToRed();
else if (theme.equalsIgnoreCase("dark"))
ThemesActivity.setThemeToDark();
}
}