Class DynamicThemePreference

All Implemented Interfaces:
SharedPreferences.OnSharedPreferenceChangeListener, Drawable.Callback, AccessibilityEventSource, KeyEvent.Callback, ViewManager, ViewParent, DynamicThemeResolver<DynamicAppTheme>, BaseWidget, DynamicTintWidget, DynamicWidget
Direct Known Subclasses:
DynamicAppThemePreference, DynamicDayThemePreference, DynamicNightThemePreference

public class DynamicThemePreference extends ThemePreference<DynamicAppTheme>
A ThemePreference to display and edit the DynamicAppTheme.
  • Constructor Details

  • Method Details

    • getLayoutRes

      @LayoutRes protected int getLayoutRes()
      Description copied from class: DynamicView
      This method will be called to get the layout resource for this view.

      Supply the view layout resource here to do the inflation.

      Overrides:
      getLayoutRes in class DynamicSimplePreference
      Returns:
      The layout resource for this view.
    • getDefaultTheme

      @NonNull public String getDefaultTheme(@Nullable String theme)
      Description copied from interface: DynamicThemeResolver
      Returns the default theme string.
      Parameters:
      theme - The current default dynamic theme string.
      Returns:
      The default theme string.
    • getDynamicTheme

      @Nullable public DynamicAppTheme getDynamicTheme(@Nullable String theme)
      Description copied from interface: DynamicThemeResolver
      Returns the dynamic theme according to the supplied string.
      Parameters:
      theme - The dynamic theme string to be converted.
      Returns:
      The dynamic theme according to the supplied string.