Interface DynamicTextWidget
- All Superinterfaces:
BaseWidget,DynamicWidget
- All Known Implementing Classes:
DynamicBottomAppBar,DynamicBottomNavigationView,DynamicNavigationRailView,DynamicTabLayout,DynamicToolbar
Interface to create dynamic widgets with a text view which can be tinted according to the
DynamicTheme.-
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of text color applied to this widget.intgetTextColor(boolean resolve) Returns the value of text color applied to this widget.intReturns the text color type applied to this widget.voidSet text color for this widget according to the supplied values.voidsetTextColor(int textColor) Set the value of text color for this widget.voidsetTextColorType(int textColorType) Set the text color type to this widget.voidsetTextWidgetColor(boolean setTextColor) Set color and text color for this widget at once.Methods inherited from interface com.pranavpandey.android.dynamic.support.widget.base.BaseWidget
initialize, loadFromAttributesMethods inherited from interface com.pranavpandey.android.dynamic.support.widget.base.DynamicWidget
getBackgroundAware, getColor, getColor, getColorType, getContrast, getContrast, getContrastRatio, getContrastWithColor, getContrastWithColorType, isBackgroundAware, setBackgroundAware, setColor, setColor, setColorType, setContrast, setContrastWithColor, setContrastWithColorType, setEnabled
-
Method Details
-
getTextColorType
int getTextColorType()Returns the text color type applied to this widget.- Returns:
- The text color type applied to this widget.
- See Also:
-
setTextColorType
void setTextColorType(int textColorType) Set the text color type to this widget.- Parameters:
textColorType- Text color type for this widget.- See Also:
-
getTextColor
Returns the value of text color applied to this widget.- Parameters:
resolve-trueto resolve the text color applied to this widget.- Returns:
- The value of text color applied to this widget.
-
getTextColor
Returns the value of text color applied to this widget.- Returns:
- The value of text color applied to this widget.
-
setTextColor
Set the value of text color for this widget.- Parameters:
textColor- Text color for this widget.
-
setTextColor
void setTextColor()Set text color for this widget according to the supplied values.Generally, it should be a tint color so that text will be visible on this widget background.
-
setTextWidgetColor
void setTextWidgetColor(boolean setTextColor) Set color and text color for this widget at once.- Parameters:
setTextColor-trueto set the text color also.
-