Пример #1
0
  /** Updates all theme observers. */
  public static void updateThemeObservers() {
    for (ThemeObserver curObserver : THEME_OBSERVERS) {
      curObserver.updateTheme();
    }

    // GUIMediator.getMainOptionsComponent().validate();
    // GUIMediator.getAppFrame().validate();
  }
Пример #2
0
 @SuppressWarnings("WrongConstant")
 private void setTheme(@Theme int themeId) {
   currentTheme = themeId;
   prefs.edit().putString(deprecatedThemeKey, String.valueOf(currentTheme)).apply();
   prefs.edit().putBoolean(themeKey, isDarkTheme()).apply();
   for (ThemeObserver observer : observers) {
     observer.onThemeHasChanged(currentTheme);
   }
 }