Interface BackgroundTheme<T extends BackgroundTheme<T>>

Type Parameters:
T - The type of the dynamic theme.
All Superinterfaces:
BaseTheme<T>
All Known Subinterfaces:
DynamicColor<T>
All Known Implementing Classes:
AppTheme, AppWidgetTheme

public interface BackgroundTheme<T extends BackgroundTheme<T>> extends BaseTheme<T>
A BaseTheme to implement the background theme.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the background color used by this theme.
    int
    getBackgroundColor(boolean resolve)
    Returns the background color used by this theme.
    int
    getBackgroundColor(boolean resolve, boolean inverse)
    Returns the background color used by this theme.
    int
    Returns the background tint color used by this theme.
    int
    getTintBackgroundColor(boolean resolve)
    Returns the background tint color used by this theme.
    int
    getTintBackgroundColor(boolean resolve, boolean inverse)
    Returns the background tint color used by this theme.
    boolean
    Returns true if this theme is dark.
    boolean
    Checks whether this theme is applied in the inverse mode.
    boolean
    Returns whether to show the dividers for this theme.
    setBackgroundColor(int backgroundColor)
    Set the background color used by this theme.
    setBackgroundColor(int backgroundColor, boolean generateTint)
    Set the background color used by this theme.
    setTintBackgroundColor(int tintBackgroundColor)
    Set the background tint color used by this theme.

    Methods inherited from interface com.pranavpandey.android.dynamic.theme.base.BaseTheme

    isHost, setHost
  • Method Details

    • getBackgroundColor

      @ColorInt int getBackgroundColor(boolean resolve, boolean inverse)
      Returns the background color used by this theme.
      Parameters:
      resolve - true to resolve the auto color.
      inverse - true to resolve the inverse color.
      Returns:
      The background color used by this theme.
    • getBackgroundColor

      @ColorInt int getBackgroundColor(boolean resolve)
      Returns the background color used by this theme.
      Parameters:
      resolve - true to resolve the auto color.
      Returns:
      The background color used by this theme.
    • getBackgroundColor

      @ColorInt int getBackgroundColor()
      Returns the background color used by this theme.
      Returns:
      The background color used by this theme.
    • setBackgroundColor

      @NonNull T setBackgroundColor(@ColorInt int backgroundColor, boolean generateTint)
      Set the background color used by this theme.
      Parameters:
      backgroundColor - The background color to be set.
      generateTint - true to automatically generate the tint color also.
      Returns:
      The BackgroundTheme object to allow for chaining of calls to set methods.
      See Also:
    • setBackgroundColor

      @NonNull T setBackgroundColor(@ColorInt int backgroundColor)
      Set the background color used by this theme.

      It will automatically generate the tint color also.

      Parameters:
      backgroundColor - The background color to be set.
      Returns:
      The BackgroundTheme object to allow for chaining of calls to set methods.
      See Also:
    • getTintBackgroundColor

      @ColorInt int getTintBackgroundColor(boolean resolve, boolean inverse)
      Returns the background tint color used by this theme.
      Parameters:
      resolve - true to resolve the auto color.
      inverse - true to resolve the inverse color.
      Returns:
      The background tint color used by this theme.
    • getTintBackgroundColor

      @ColorInt int getTintBackgroundColor(boolean resolve)
      Returns the background tint color used by this theme.
      Parameters:
      resolve - true to resolve the auto color.
      Returns:
      The background tint color used by this theme.
    • getTintBackgroundColor

      @ColorInt int getTintBackgroundColor()
      Returns the background tint color used by this theme.
      Returns:
      The background tint color used by this theme.
    • setTintBackgroundColor

      @NonNull T setTintBackgroundColor(@ColorInt int tintBackgroundColor)
      Set the background tint color used by this theme.
      Parameters:
      tintBackgroundColor - The background tint color to be set.
      Returns:
      The BackgroundTheme object to allow for chaining of calls to set methods.
    • isDarkTheme

      boolean isDarkTheme()
      Returns true if this theme is dark.
      Returns:
      true if this theme is dark.
    • isInverseTheme

      boolean isInverseTheme()
      Checks whether this theme is applied in the inverse mode.
      Returns:
      true if this theme is applied in the inverse mode.
    • isShowDividers

      boolean isShowDividers()
      Returns whether to show the dividers for this theme.
      Returns:
      true to show the dividers for this theme.