public class StateListDrawable extends DrawableContainer
DrawableContainer.DrawableContainerState| Constructor and Description |
|---|
StateListDrawable() |
| Modifier and Type | Method and Description |
|---|---|
void |
addState(int[] stateSet,
android.graphics.drawable.Drawable drawable) |
int |
getStateCount()
Gets the number of states contained in this drawable.
|
android.graphics.drawable.Drawable |
getStateDrawable(int index)
Gets the drawable at an index.
|
int |
getStateDrawableIndex(int[] stateSet)
Gets the index of the drawable with the provided state set.
|
int[] |
getStateSet(int index)
Gets the state set at an index.
|
void |
inflate(android.content.res.Resources r,
org.xmlpull.v1.XmlPullParser parser,
android.util.AttributeSet attrs) |
boolean |
isStateful() |
android.graphics.drawable.Drawable |
mutate() |
protected boolean |
onStateChange(int[] stateSet) |
draw, getChangingConfigurations, getConstantState, getCurrent, getIntrinsicHeight, getIntrinsicWidth, getMinimumHeight, getMinimumWidth, getOpacity, getPadding, invalidateDrawable, jumpToCurrentState, onBoundsChange, onLevelChange, scheduleDrawable, selectDrawable, setAlpha, setColorFilter, setConstantState, setDither, setEnterFadeDuration, setExitFadeDuration, setVisible, unscheduleDrawableclearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXmlInner, getBounds, getCallback, getLevel, getState, getTransparentRegion, invalidateSelf, isVisible, resolveOpacity, scheduleSelf, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setFilterBitmap, setLevel, setState, unscheduleSelfpublic void addState(int[] stateSet,
android.graphics.drawable.Drawable drawable)
public int getStateCount()
getStateSet(int),
getStateDrawable(int)public android.graphics.drawable.Drawable getStateDrawable(int index)
index - The index of the drawable.getStateCount(),
getStateSet(int)public int getStateDrawableIndex(int[] stateSet)
stateSet - the state set to look upgetStateDrawable(int),
getStateSet(int)public int[] getStateSet(int index)
index - The index of the state set.getStateCount(),
getStateDrawable(int)public void inflate(android.content.res.Resources r,
org.xmlpull.v1.XmlPullParser parser,
android.util.AttributeSet attrs)
throws org.xmlpull.v1.XmlPullParserException,
IOException
inflate in class android.graphics.drawable.Drawableorg.xmlpull.v1.XmlPullParserExceptionIOExceptionpublic boolean isStateful()
isStateful in class DrawableContainerpublic android.graphics.drawable.Drawable mutate()
mutate in class DrawableContainerprotected boolean onStateChange(int[] stateSet)
onStateChange in class DrawableContainerCopyright © 2012-2013. All Rights Reserved.