Interface PrimaryTheme<T extends PrimaryTheme<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 PrimaryTheme<T extends PrimaryTheme<T>> extends BaseTheme<T>
A BaseTheme to implement the type theme.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the primary color used by this theme.
    int
    getPrimaryColor(boolean resolve)
    Returns the primary color used by this theme.
    int
    getPrimaryColor(boolean resolve, boolean inverse)
    Returns the primary color used by this theme.
    int
    Returns the dark primary color used by this theme.
    int
    getPrimaryColorDark(boolean resolve)
    Returns the dark primary color used by this theme.
    int
    getPrimaryColorDark(boolean resolve, boolean inverse)
    Returns the dark primary color used by this theme.
    int
    Returns the primary tint color used by this theme.
    int
    getTintPrimaryColor(boolean resolve)
    Returns the primary tint color used by this theme.
    int
    getTintPrimaryColor(boolean resolve, boolean inverse)
    Returns the primary tint color used by this theme.
    int
    Returns the dark primary tint color used by this theme.
    int
    getTintPrimaryColorDark(boolean resolve)
    Returns the dark primary tint color used by this theme.
    int
    getTintPrimaryColorDark(boolean resolve, boolean inverse)
    Returns the dark primary tint color used by this theme.
    setPrimaryColor(int primaryColor)
    Set the primary color used by this theme.
    setPrimaryColor(int primaryColor, boolean generateTint)
    Set the primary color used by this theme.
    setPrimaryColorDark(int primaryColorDark)
    Set the dark primary color used by this theme.
    setPrimaryColorDark(int primaryColorDark, boolean generateTint)
    Set the dark primary color used by this theme.
    setTintPrimaryColor(int tintPrimaryColor)
    Set the primary tint color used by this theme.
    setTintPrimaryColorDark(int tintPrimaryColorDark)
    Set the dark primary tint color used by this theme.

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

    isHost, setHost
  • Method Details

    • getPrimaryColor

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

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

      @ColorInt int getPrimaryColor()
      Returns the primary color used by this theme.
      Returns:
      The primary color used by this theme.
    • setPrimaryColor

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

      @NonNull T setPrimaryColor(@ColorInt int primaryColor)
      Set the primary color used by this theme.

      It will automatically generate the tint color also.

      Parameters:
      primaryColor - The primary color to be set.
      Returns:
      The PrimaryTheme object to allow for chaining of calls to set methods.
      See Also:
    • getPrimaryColorDark

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

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

      @ColorInt int getPrimaryColorDark()
      Returns the dark primary color used by this theme.
      Returns:
      The dark primary color used by this theme.
    • setPrimaryColorDark

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

      @NonNull T setPrimaryColorDark(@ColorInt int primaryColorDark)
      Set the dark primary color used by this theme.

      It will automatically generate the tint color also.

      Parameters:
      primaryColorDark - The dark primary color to be set.
      Returns:
      The PrimaryTheme object to allow for chaining of calls to set methods.
      See Also:
    • getTintPrimaryColor

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

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

      @ColorInt int getTintPrimaryColor()
      Returns the primary tint color used by this theme.
      Returns:
      The primary tint color used by this theme.
    • setTintPrimaryColor

      @NonNull T setTintPrimaryColor(@ColorInt int tintPrimaryColor)
      Set the primary tint color used by this theme.
      Parameters:
      tintPrimaryColor - The primary tint color to be set.
      Returns:
      The PrimaryTheme object to allow for chaining of calls to set methods.
    • getTintPrimaryColorDark

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

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

      @ColorInt int getTintPrimaryColorDark()
      Returns the dark primary tint color used by this theme.
      Returns:
      The dark primary tint color used by this theme.
    • setTintPrimaryColorDark

      @NonNull T setTintPrimaryColorDark(@ColorInt int tintPrimaryColorDark)
      Set the dark primary tint color used by this theme.
      Parameters:
      tintPrimaryColorDark - The dark primary tint color to be set.
      Returns:
      The PrimaryTheme object to allow for chaining of calls to set methods.