public interface TintableCompoundButton
CompoundButton
to receive tinting
calls from CompoundButtonCompat
when running on API v20 devices or lower.Modifier and Type | Method and Description |
---|---|
ColorStateList |
getSupportButtonTintList()
Returns the tint applied to the button drawable
|
PorterDuff.Mode |
getSupportButtonTintMode()
Returns the blending mode used to apply the tint to the button drawable
|
void |
setSupportButtonTintList(ColorStateList tint)
Applies a tint to the button drawable.
|
void |
setSupportButtonTintMode(PorterDuff.Mode tintMode)
Specifies the blending mode which should be used to apply the tint specified by
setSupportButtonTintList(ColorStateList) to the button drawable. |
void setSupportButtonTintList(@Nullable ColorStateList tint)
PorterDuff.Mode#SRC_IN
by default.
Subsequent calls to
setButtonDrawable(Drawable)
should automatically mutate the drawable and apply the specified tint and tint mode.
tint
- the tint to apply, may be null
to clear tint@Nullable ColorStateList getSupportButtonTintList()
setSupportButtonTintList(ColorStateList)
void setSupportButtonTintMode(@Nullable PorterDuff.Mode tintMode)
setSupportButtonTintList(ColorStateList)
to the button drawable. The
default mode is PorterDuff.Mode#SRC_IN
.tintMode
- the blending mode used to apply the tint, may be
null
to clear tintgetSupportButtonTintMode()
,
DrawableCompat#setTintMode(Drawable, PorterDuff.Mode)
@Nullable PorterDuff.Mode getSupportButtonTintMode()