public abstract class StatePaintDrawable extends StateColorDrawable
StateColorDrawable(ColorStateList) State
Subclasses should implement draw(Canvas, Paint)
Drawable.Callback, Drawable.ConstantState| 构造器和说明 |
|---|
StatePaintDrawable(ColorStateList tintStateList)
Initializes local dynamic properties from state.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
draw(Canvas canvas) |
abstract void |
draw(Canvas canvas,
Paint paint)
Subclasses should implement this method to do the actual drawing
|
int |
getOpacity() |
Paint |
getPaint()
Returns the Paint used to draw the shape.
|
boolean |
isStateful() |
protected void |
onColorChange(int color) |
protected boolean |
onStateChange(int[] stateSet)
Update tint color
|
void |
setColorFilter(ColorFilter cf) |
void |
setDither(boolean dither) |
void |
setTintList(ColorStateList tint) |
void |
setTintMode(PorterDuff.Mode tintMode) |
changeColor, getAlpha, getColor, getColorStateList, setAlpha, setColor, setColorStateListapplyTheme, canApplyTheme, clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXml, createFromXmlInner, createFromXmlInner, getBounds, getCallback, getChangingConfigurations, getColorFilter, getConstantState, getCurrent, getDirtyBounds, getHotspotBounds, getIntrinsicHeight, getIntrinsicWidth, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getOutline, getPadding, getState, getTransparentRegion, inflate, inflate, invalidateSelf, isAutoMirrored, isFilterBitmap, isVisible, jumpToCurrentState, mutate, onBoundsChange, onLayoutDirectionChanged, onLevelChange, resolveOpacity, scheduleSelf, setAutoMirrored, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setFilterBitmap, setHotspot, setHotspotBounds, setLayoutDirection, setLevel, setState, setTint, setVisible, unscheduleSelfprotected final Paint mPaint
public StatePaintDrawable(ColorStateList tintStateList)
tintStateList - ColorStateListpublic void setColorFilter(ColorFilter cf)
setColorFilter 在类中 Drawablepublic int getOpacity()
getOpacity 在类中 Drawablepublic void setTintList(ColorStateList tint)
setTintList 在类中 Drawablepublic void setTintMode(PorterDuff.Mode tintMode)
setTintMode 在类中 Drawablepublic boolean isStateful()
isStateful 在类中 StateColorDrawableprotected boolean onStateChange(int[] stateSet)
StateColorDrawableonStateChange 在类中 StateColorDrawablestateSet - tint statsprotected void onColorChange(int color)
onColorChange 在类中 StateColorDrawablepublic Paint getPaint()
public abstract void draw(Canvas canvas, Paint paint)
canvas - The current Canvas to draw intopaint - The Paint the Paint object that defines with the current
ColorStateList color