-
public abstract class StateDrawable extends Drawable
A drawable that changes it's Paint color depending on the Drawable State
Subclasses should implement doDraw
-
-
Constructor Summary
Constructors Constructor Description StateDrawable(ColorStateList tintStateList)
-
Method Summary
Modifier and Type Method Description booleanisStateful()booleansetState(Array<int> stateSet)intgetOpacity()voiddraw(Canvas canvas)voidsetColorStateList(@NonNull() ColorStateList tintStateList)voidsetAlpha(int alpha)intgetAlpha()voidsetColorFilter(ColorFilter cf)-
Methods inherited from class android.graphics.drawable.Drawable
applyTheme, canApplyTheme, clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromStream, createFromXml, createFromXmlInner, draw, getAlpha, getBounds, getCallback, getChangingConfigurations, getColorFilter, getConstantState, getCurrent, getDirtyBounds, getHotspotBounds, getIntrinsicHeight, getIntrinsicWidth, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getOpacity, getOpticalInsets, getOutline, getPadding, getState, getTransparentRegion, hasFocusStateSpecified, inflate, invalidateSelf, isAutoMirrored, isFilterBitmap, isProjected, isStateful, isVisible, jumpToCurrentState, mutate, onLayoutDirectionChanged, resolveOpacity, scheduleSelf, setAlpha, setAutoMirrored, setBounds, setCallback, setChangingConfigurations, setColorFilter, setDither, setFilterBitmap, setHotspot, setHotspotBounds, setLayoutDirection, setLevel, setState, setTint, setTintBlendMode, setTintList, setTintMode, setVisible, unscheduleSelf -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
StateDrawable
StateDrawable(ColorStateList tintStateList)
-
-
Method Detail
-
isStateful
boolean isStateful()
-
getOpacity
int getOpacity()
-
setColorStateList
void setColorStateList(@NonNull() ColorStateList tintStateList)
-
setAlpha
void setAlpha(int alpha)
-
getAlpha
int getAlpha()
-
setColorFilter
void setColorFilter(ColorFilter cf)
-
-
-
-