public interface TintableDrawable
Drawable that is tintable.| Modifier and Type | Method and Description |
|---|---|
void |
setTint(int tintColor)
Specifies tint color for this drawable.
|
void |
setTintList(android.content.res.ColorStateList tint)
Specifies tint color for this drawable as a color state list.
|
void |
setTintMode(android.graphics.PorterDuff.Mode tintMode)
Specifies a tint blending mode for this drawable.
|
void setTint(int tintColor)
A Drawable's drawing content will be blended together with its tint
before it is drawn to the screen. This functions similarly to
Drawable.setColorFilter(int, PorterDuff.Mode).
To clear the tint, pass null to
setTintList(ColorStateList).
Note: Setting a color filter via
Drawable.setColorFilter(ColorFilter) or
Drawable.setColorFilter(int, PorterDuff.Mode) overrides tint.
tintColor - Color to use for tinting this drawablesetTintList(ColorStateList),
setTintMode(PorterDuff.Mode)void setTintList(@Nullable
android.content.res.ColorStateList tint)
A Drawable's drawing content will be blended together with its tint
before it is drawn to the screen. This functions similarly to
Drawable.setColorFilter(int, PorterDuff.Mode).
Note: Setting a color filter via
Drawable.setColorFilter(ColorFilter) or
Drawable.setColorFilter(int, PorterDuff.Mode) overrides tint.
tint - Color state list to use for tinting this drawable, or
null to clear the tintsetTint(int),
setTintMode(PorterDuff.Mode)void setTintMode(@NonNull
android.graphics.PorterDuff.Mode tintMode)
Defines how this drawable's tint color should be blended into the drawable
before it is drawn to screen. Default tint mode is PorterDuff.Mode#SRC_IN.
Note: Setting a color filter via
Drawable.setColorFilter(ColorFilter) or
Drawable.setColorFilter(int, PorterDuff.Mode) overrides tint.
tintMode - A Porter-Duff blending modesetTint(int),
setTintList(ColorStateList)