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
A
BaseTheme to implement the text theme.-
Method Summary
Modifier and TypeMethodDescriptionintReturns the font scaling factor used by this theme.intgetFontScale(boolean resolve) Returns the font scaling factor used by this theme.floatReturns the relative font scale after dividing it by 100.intReturns the highlight color for this theme.intgetHighlightColor(int contrastWithColor) Returns the highlight color for this theme.intReturns the primary text color used by this theme.intgetTextPrimaryColor(boolean resolve) Returns the primary text color used by this theme.intgetTextPrimaryColor(boolean resolve, boolean inverse) Returns the primary text color used by this theme.intReturns the inverse color for the primary text color.intgetTextPrimaryColorInverse(boolean resolve) Returns the inverse color for the primary text color.intgetTextPrimaryColorInverse(boolean resolve, boolean inverse) Returns the inverse color for the primary text color.intReturns the secondary text color used by this theme.intgetTextSecondaryColor(boolean resolve) Returns the secondary text color used by this theme.intgetTextSecondaryColor(boolean resolve, boolean inverse) Returns the secondary text color used by this theme.intReturns the inverse color for the secondary text color.intgetTextSecondaryColorInverse(boolean resolve) Returns the inverse color for the secondary text color.intgetTextSecondaryColorInverse(boolean resolve, boolean inverse) Returns the inverse color for the secondary text color.booleanChecks whether the custom font scale is set.setFontScale(int fontScale) Set the font scaling factor used by this theme.setTextPrimaryColor(int textPrimaryColor) Set the primary text color used by this theme.setTextPrimaryColor(int textPrimaryColor, boolean generateInverse) Set the primary text color used by this theme.setTextPrimaryColorInverse(int textPrimaryColorInverse) Set the primary text inverse color used by this theme.setTextSecondaryColor(int textSecondaryColor) Set the secondary text color used by this theme.setTextSecondaryColor(int textSecondaryColor, boolean generateInverse) Set the secondary text color used by this theme.setTextSecondaryColorInverse(int textSecondaryColorInverse) Set the secondary text inverse color used by this theme.
-
Method Details
-
getTextPrimaryColor
Returns the primary text color used by this theme.- Parameters:
resolve-trueto resolve the auto color.inverse-trueto resolve the inverse color.- Returns:
- The primary text color used by this theme.
-
getTextPrimaryColor
Returns the primary text color used by this theme.- Parameters:
resolve-trueto resolve the auto color.- Returns:
- The primary text color used by this theme.
-
getTextPrimaryColor
Returns the primary text color used by this theme.- Returns:
- The primary text color used by this theme.
-
setTextPrimaryColor
Set the primary text color used by this theme.- Parameters:
textPrimaryColor- The primary text color to be set.generateInverse-trueto automatically generate the inverse color also.- Returns:
- The
TextThemeobject to allow for chaining of calls to set methods. - See Also:
-
setTextPrimaryColor
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
TextThemeobject to allow for chaining of calls to set methods. - See Also:
-
getTextSecondaryColor
Returns the secondary text color used by this theme.- Parameters:
resolve-trueto resolve the auto color.inverse-trueto resolve the inverse color.- Returns:
- The secondary text color used by this theme.
-
getTextSecondaryColor
Returns the secondary text color used by this theme.- Parameters:
resolve-trueto resolve the auto color.- Returns:
- The secondary text color used by this theme.
-
getTextSecondaryColor
Returns the secondary text color used by this theme.- Returns:
- The secondary text color used by this theme.
-
setTextSecondaryColor
Set the secondary text color used by this theme.- Parameters:
textSecondaryColor- The secondary text color to be set.generateInverse-trueto automatically generate the inverse color also.- Returns:
- The
TextThemeobject to allow for chaining of calls to set methods. - See Also:
-
setTextSecondaryColor
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
TextThemeobject to allow for chaining of calls to set methods. - See Also:
-
getTextPrimaryColorInverse
Returns the inverse color for the primary text color.- Parameters:
resolve-trueto resolve the auto color.inverse-trueto resolve the inverse color.- Returns:
- The inverse color for the primary text color.
-
getTextPrimaryColorInverse
Returns the inverse color for the primary text color.- Parameters:
resolve-trueto resolve the auto color.- Returns:
- The inverse color for the primary text color.
-
getTextPrimaryColorInverse
Returns the inverse color for the primary text color.- Returns:
- The inverse color for the primary text color.
-
setTextPrimaryColorInverse
Set the primary text inverse color used by this theme.- Parameters:
textPrimaryColorInverse- The primary text inverse color to be set.- Returns:
- The
TextThemeobject to allow for chaining of calls to set methods.
-
getTextSecondaryColorInverse
Returns the inverse color for the secondary text color.- Parameters:
resolve-trueto resolve the auto color.inverse-trueto resolve the inverse color.- Returns:
- The inverse color for the secondary text color.
-
getTextSecondaryColorInverse
Returns the inverse color for the secondary text color.- Parameters:
resolve-trueto resolve the auto color.- Returns:
- The inverse color for the secondary text color.
-
getTextSecondaryColorInverse
Returns the inverse color for the secondary text color.- Returns:
- The inverse color for the secondary text color.
-
setTextSecondaryColorInverse
Set the secondary text inverse color used by this theme.- Parameters:
textSecondaryColorInverse- The secondary text inverse color to be set.- Returns:
- The
TextThemeobject to allow for chaining of calls to set methods.
-
getHighlightColor
Returns the highlight color for this theme.- Parameters:
contrastWithColor- The contrast with color to be used.- Returns:
- The highlight color for this theme.
-
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-trueto 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
Set the font scaling factor used by this theme.- Parameters:
fontScale- The font scaling factor (in percent) to be set.- Returns:
- The
TextThemeobject to allow for chaining of calls to set methods.
-
isFontScale
boolean isFontScale()Checks whether the custom font scale is set.- Returns:
trueif the custom font scale is set.
-