Interface TextTheme<T extends TextTheme<T>>

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

public interface TextTheme<T extends TextTheme<T>> extends BaseTheme<T>
A BaseTheme to implement the text theme.
  • Method Details

    • getTextPrimaryColor

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

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

      @ColorInt int getTextPrimaryColor()
      Returns the primary text color used by this theme.
      Returns:
      The primary text color used by this theme.
    • setTextPrimaryColor

      @NonNull T setTextPrimaryColor(@ColorInt int textPrimaryColor, boolean generateInverse)
      Set the primary text color used by this theme.
      Parameters:
      textPrimaryColor - The primary text color to be set.
      generateInverse - true to automatically generate the inverse color also.
      Returns:
      The TextTheme object to allow for chaining of calls to set methods.
      See Also:
    • setTextPrimaryColor

      @NonNull T setTextPrimaryColor(@ColorInt int textPrimaryColor)
      Set the primary text color used by this theme.

      It will automatically generate the inverse color also.

      Parameters:
      textPrimaryColor - The primary text color to be set.
      Returns:
      The TextTheme object to allow for chaining of calls to set methods.
      See Also:
    • getTextSecondaryColor

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

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

      @ColorInt int getTextSecondaryColor()
      Returns the secondary text color used by this theme.
      Returns:
      The secondary text color used by this theme.
    • setTextSecondaryColor

      @NonNull T setTextSecondaryColor(@ColorInt int textSecondaryColor, boolean generateInverse)
      Set the secondary text color used by this theme.
      Parameters:
      textSecondaryColor - The secondary text color to be set.
      generateInverse - true to automatically generate the inverse color also.
      Returns:
      The TextTheme object to allow for chaining of calls to set methods.
      See Also:
    • setTextSecondaryColor

      @NonNull T setTextSecondaryColor(@ColorInt int textSecondaryColor)
      Set the secondary text color used by this theme.

      It will automatically generate the inverse color also.

      Parameters:
      textSecondaryColor - The secondary text color to be set.
      Returns:
      The TextTheme object to allow for chaining of calls to set methods.
      See Also:
    • getTextPrimaryColorInverse

      @ColorInt int getTextPrimaryColorInverse(boolean resolve, boolean inverse)
      Returns the inverse color for the primary text color.
      Parameters:
      resolve - true to resolve the auto color.
      inverse - true to resolve the inverse color.
      Returns:
      The inverse color for the primary text color.
    • getTextPrimaryColorInverse

      @ColorInt int getTextPrimaryColorInverse(boolean resolve)
      Returns the inverse color for the primary text color.
      Parameters:
      resolve - true to resolve the auto color.
      Returns:
      The inverse color for the primary text color.
    • getTextPrimaryColorInverse

      @ColorInt int getTextPrimaryColorInverse()
      Returns the inverse color for the primary text color.
      Returns:
      The inverse color for the primary text color.
    • setTextPrimaryColorInverse

      @NonNull T setTextPrimaryColorInverse(int textPrimaryColorInverse)
      Set the primary text inverse color used by this theme.
      Parameters:
      textPrimaryColorInverse - The primary text inverse color to be set.
      Returns:
      The TextTheme object to allow for chaining of calls to set methods.
    • getTextSecondaryColorInverse

      @ColorInt int getTextSecondaryColorInverse(boolean resolve, boolean inverse)
      Returns the inverse color for the secondary text color.
      Parameters:
      resolve - true to resolve the auto color.
      inverse - true to resolve the inverse color.
      Returns:
      The inverse color for the secondary text color.
    • getTextSecondaryColorInverse

      @ColorInt int getTextSecondaryColorInverse(boolean resolve)
      Returns the inverse color for the secondary text color.
      Parameters:
      resolve - true to resolve the auto color.
      Returns:
      The inverse color for the secondary text color.
    • getTextSecondaryColorInverse

      @ColorInt int getTextSecondaryColorInverse()
      Returns the inverse color for the secondary text color.
      Returns:
      The inverse color for the secondary text color.
    • setTextSecondaryColorInverse

      @NonNull T setTextSecondaryColorInverse(int textSecondaryColorInverse)
      Set the secondary text inverse color used by this theme.
      Parameters:
      textSecondaryColorInverse - The secondary text inverse color to be set.
      Returns:
      The TextTheme object to allow for chaining of calls to set methods.
    • getHighlightColor

      @ColorInt int getHighlightColor(@ColorInt int contrastWithColor)
      Returns the highlight color for this theme.
      Parameters:
      contrastWithColor - The contrast with color to be used.
      Returns:
      The highlight color for this theme.
    • getHighlightColor

      @ColorInt int getHighlightColor()
      Returns the highlight color for this theme.
      Returns:
      The highlight color for this theme.
    • getFontScale

      int getFontScale(boolean resolve)
      Returns the font scaling factor used by this theme.
      Parameters:
      resolve - true to resolve the auto font scale.
      Returns:
      The font scaling factor (in percent) used by this theme.
    • getFontScale

      int getFontScale()
      Returns the font scaling factor used by this theme.
      Returns:
      The font scaling factor (in percent) used by this theme.
    • getFontScaleRelative

      float getFontScaleRelative()
      Returns the relative font scale after dividing it by 100.
      Returns:
      The relative font scale after dividing it by 100.
    • setFontScale

      @NonNull T setFontScale(int fontScale)
      Set the font scaling factor used by this theme.
      Parameters:
      fontScale - The font scaling factor (in percent) to be set.
      Returns:
      The TextTheme object to allow for chaining of calls to set methods.
    • isFontScale

      boolean isFontScale()
      Checks whether the custom font scale is set.
      Returns:
      true if the custom font scale is set.