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 TypeMethodDescriptionint
Returns the font scaling factor used by this theme.int
getFontScale
(boolean resolve) Returns the font scaling factor used by this theme.float
Returns the relative font scale after dividing it by 100.int
Returns the highlight color for this theme.int
getHighlightColor
(int contrastWithColor) Returns the highlight color for this theme.int
Returns the primary text color used by this theme.int
getTextPrimaryColor
(boolean resolve) Returns the primary text color used by this theme.int
getTextPrimaryColor
(boolean resolve, boolean inverse) Returns the primary text color used by this theme.int
Returns the inverse color for the primary text color.int
getTextPrimaryColorInverse
(boolean resolve) Returns the inverse color for the primary text color.int
getTextPrimaryColorInverse
(boolean resolve, boolean inverse) Returns the inverse color for the primary text color.int
Returns the secondary text color used by this theme.int
getTextSecondaryColor
(boolean resolve) Returns the secondary text color used by this theme.int
getTextSecondaryColor
(boolean resolve, boolean inverse) Returns the secondary text color used by this theme.int
Returns the inverse color for the secondary text color.int
getTextSecondaryColorInverse
(boolean resolve) Returns the inverse color for the secondary text color.int
getTextSecondaryColorInverse
(boolean resolve, boolean inverse) Returns the inverse color for the secondary text color.boolean
Checks 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
-true
to resolve the auto color.inverse
-true
to 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
-true
to 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
-true
to automatically generate the inverse color also.- Returns:
- The
TextTheme
object 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
TextTheme
object to allow for chaining of calls to set methods. - See Also:
-
getTextSecondaryColor
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
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
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
-true
to automatically generate the inverse color also.- Returns:
- The
TextTheme
object 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
TextTheme
object to allow for chaining of calls to set methods. - See Also:
-
getTextPrimaryColorInverse
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
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
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
TextTheme
object to allow for chaining of calls to set methods.
-
getTextSecondaryColorInverse
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
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
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
TextTheme
object 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
-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
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.
-