public class ColorStateDrawable extends LayerDrawable
Drawable.Callback, Drawable.ConstantState
INSET_UNDEFINED, PADDING_MODE_NEST, PADDING_MODE_STACK
Constructor and Description |
---|
ColorStateDrawable(Drawable[] layers,
int color) |
Modifier and Type | Method and Description |
---|---|
boolean |
isStateful()
Indicates whether this drawable will change its appearance based on
state.
|
protected boolean |
onStateChange(int[] states)
Override this in your subclass to change appearance if you recognize the
specified state.
|
addLayer, applyTheme, canApplyTheme, clearMutated, draw, findDrawableByLayerId, findIndexByLayerId, getAlpha, getBottomPadding, getChangingConfigurations, getConstantState, getDrawable, getEndPadding, getHotspotBounds, getId, getIntrinsicHeight, getIntrinsicWidth, getLayerGravity, getLayerHeight, getLayerInsetBottom, getLayerInsetEnd, getLayerInsetLeft, getLayerInsetRight, getLayerInsetStart, getLayerInsetTop, getLayerWidth, getLeftPadding, getNumberOfLayers, getOpacity, getOutline, getPadding, getPaddingMode, getRightPadding, getStartPadding, getTopPadding, inflate, invalidateDrawable, isAutoMirrored, isProjected, jumpToCurrentState, mutate, onBoundsChange, onLayoutDirectionChanged, onLevelChange, scheduleDrawable, setAlpha, setAutoMirrored, setColorFilter, setDither, setDrawable, setDrawableByLayerId, setHotspot, setHotspotBounds, setId, setLayerGravity, setLayerHeight, setLayerInset, setLayerInsetBottom, setLayerInsetEnd, setLayerInsetLeft, setLayerInsetRelative, setLayerInsetRight, setLayerInsetStart, setLayerInsetTop, setLayerSize, setLayerWidth, setOpacity, setPadding, setPaddingMode, setPaddingRelative, setTintList, setTintMode, setVisible, unscheduleDrawable
clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXml, createFromXmlInner, createFromXmlInner, getBounds, getCallback, getColorFilter, getCurrent, getDirtyBounds, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getOpticalInsets, getState, getTransparentRegion, inflate, invalidateSelf, isFilterBitmap, isVisible, obtainAttributes, parseTintMode, resolveOpacity, scheduleSelf, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setFilterBitmap, setLayoutDirection, setLevel, setState, setTint, setXfermode, unscheduleSelf
public ColorStateDrawable(Drawable[] layers, int color)
protected boolean onStateChange(int[] states)
Drawable
onStateChange
in class LayerDrawable
public boolean isStateful()
Drawable
isStateful
in class LayerDrawable
Drawable.setState(int[])