public interface TintableBackgroundView
View
to receive background tinting calls from
ViewCompat
when running on API v20 devices or lower.Modifier and Type | Method and Description |
---|---|
ColorStateList |
getSupportBackgroundTintList()
Return the tint applied to the background drawable, if specified.
|
PorterDuff.Mode |
getSupportBackgroundTintMode()
Return the blending mode used to apply the tint to the background
drawable, if specified.
|
void |
setSupportBackgroundTintList(ColorStateList tint)
Applies a tint to the background drawable.
|
void |
setSupportBackgroundTintMode(PorterDuff.Mode tintMode)
Specifies the blending mode used to apply the tint specified by
setSupportBackgroundTintList(ColorStateList) } to the background
drawable. |
void setSupportBackgroundTintList(@Nullable ColorStateList tint)
PorterDuff.Mode#SRC_IN
by default.
Subsequent calls to View.setBackground(Drawable)
will automatically
mutate the drawable and apply the specified tint and tint mode.
tint
- the tint to apply, may be null
to clear tintgetSupportBackgroundTintList()
@Nullable ColorStateList getSupportBackgroundTintList()
void setSupportBackgroundTintMode(@Nullable PorterDuff.Mode tintMode)
setSupportBackgroundTintList(ColorStateList)
} to the background
drawable. The default mode is PorterDuff.Mode#SRC_IN
.tintMode
- the blending mode used to apply the tint, may be
null
to clear tintgetSupportBackgroundTintMode()
@Nullable PorterDuff.Mode getSupportBackgroundTintMode()