StateListDrawable

Class of android.graphics.drawable · StateListDrawable.java · Android's reference

public class StateListDrawable extends DrawableContainer

StateListDrawable ← DrawableContainer ← Drawable

A drawable that shows the first child whose state set matches its state.

Extended in the framework by

Constructors

public StateListDrawable() source

Methods

public void addState(int[] stateSet, Drawable drawable) source
public boolean isStateful() source
protected boolean onStateChange(int[] stateSet) source
public void inflate(Resources r, org.xmlpull.v1.XmlPullParser parser, android.util.AttributeSet attrs, Resources.Theme theme) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException source

a selector's items: each the state set of its android:state_* attributes and its drawable

public int getStateCount() source
public int[] getStateSet(int index) source
public Drawable getStateDrawable(int index) source
public int findStateDrawableIndex(int[] stateSet) source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.