public abstract class StateColorDrawable extends Drawable
Subclasses should implement onColorChange(int) if new color != current color call this }
Drawable.Callback, Drawable.ConstantState| 构造器和说明 |
|---|
StateColorDrawable(ColorStateList tintStateList) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected boolean |
changeColor(int color)
Set CurrentColor value
|
int |
getAlpha() |
int |
getColor()
Get The CurrentColor
|
ColorStateList |
getColorStateList()
Get the Tint ColorStateList
|
boolean |
isStateful() |
protected void |
onColorChange(int color) |
protected boolean |
onStateChange(int[] state)
Update tint color
|
void |
setAlpha(int alpha)
Set the alpha level for this drawable [0..255].
|
void |
setColor(int color)
Set color trans to ColorStateList
|
void |
setColorStateList(ColorStateList tintStateList)
Set the Tint ColorStateList
|
applyTheme, canApplyTheme, clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXml, createFromXmlInner, createFromXmlInner, draw, getBounds, getCallback, getChangingConfigurations, getColorFilter, getConstantState, getCurrent, getDirtyBounds, getHotspotBounds, getIntrinsicHeight, getIntrinsicWidth, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getOpacity, getOutline, getPadding, getState, getTransparentRegion, inflate, inflate, invalidateSelf, isAutoMirrored, isFilterBitmap, isVisible, jumpToCurrentState, mutate, onBoundsChange, onLayoutDirectionChanged, onLevelChange, resolveOpacity, scheduleSelf, setAutoMirrored, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setColorFilter, setDither, setFilterBitmap, setHotspot, setHotspotBounds, setLayoutDirection, setLevel, setState, setTint, setTintList, setTintMode, setVisible, unscheduleSelfpublic StateColorDrawable(ColorStateList tintStateList)
public boolean isStateful()
isStateful 在类中 Drawableprotected boolean onStateChange(int[] state)
onStateChange 在类中 Drawablestate - tint statspublic void setAlpha(int alpha)
public void setColor(int color)
color - Colorpublic void setColorStateList(ColorStateList tintStateList)
tintStateList - ColorStateListpublic ColorStateList getColorStateList()
public int getColor()
protected boolean changeColor(int color)
color - New Colorprotected void onColorChange(int color)