TintableCompoundDrawablesView
interface TintableCompoundDrawablesView
androidx.core.widget.TintableCompoundDrawablesView |
Interface which allows android.widget.TextView
and subclasses to tint compound drawables with TextViewCompat
when running on API v22 devices or lower.
Summary
Public methods | |
---|---|
abstract ColorStateList? |
Return the tint applied to the compound drawables, if specified. |
abstract Mode? |
Returns the blending mode used to apply the tint to the compound drawables, if specified. |
abstract Unit |
setSupportCompoundDrawablesTintList(@Nullable tint: ColorStateList?) Applies a tint to the compound drawables. |
abstract Unit |
setSupportCompoundDrawablesTintMode(@Nullable tintMode: Mode?) Specifies the blending mode used to apply the tint specified by |
Public methods
getSupportCompoundDrawablesTintList
@Nullable abstract fun getSupportCompoundDrawablesTintList(): ColorStateList?
Return the tint applied to the compound drawables, if specified.
Return | |
---|---|
ColorStateList? |
the tint applied to the compound drawables |
getSupportCompoundDrawablesTintMode
@Nullable abstract fun getSupportCompoundDrawablesTintMode(): Mode?
Returns the blending mode used to apply the tint to the compound drawables, if specified.
Return | |
---|---|
Mode? |
the blending mode used to apply the tint to the compound drawables |
setSupportCompoundDrawablesTintList
abstract fun setSupportCompoundDrawablesTintList(@Nullable tint: ColorStateList?): Unit
Applies a tint to the compound drawables. Does not modify the current tint mode, which is PorterDuff.Mode#SRC_IN
by default.
Subsequent calls to android.widget.TextView#setCompoundDrawables(Drawable, Drawable, Drawable, Drawable) and related methods will automatically mutate the drawables and apply the specified tint and tint mode.
Parameters | |
---|---|
tint |
ColorStateList?: the tint to apply, may be null to clear tint |
setSupportCompoundDrawablesTintMode
abstract fun setSupportCompoundDrawablesTintMode(@Nullable tintMode: Mode?): Unit
Specifies the blending mode used to apply the tint specified by setSupportCompoundDrawablesTintList(ColorStateList)
to the compound drawables. The default mode is PorterDuff.Mode#SRC_IN
.
Parameters | |
---|---|
tintMode |
Mode?: the blending mode used to apply the tint, may be null to clear tint |