Package org.robolectric.shadows
Class ShadowStateListDrawable
- java.lang.Object
-
- org.robolectric.shadows.ShadowDrawable
-
- org.robolectric.shadows.ShadowStateListDrawable
-
@Implements(android.graphics.drawable.StateListDrawable.class) public class ShadowStateListDrawable extends ShadowDrawable
-
-
Constructor Summary
Constructors Constructor Description ShadowStateListDrawable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addState(int[] stateSet, Drawable drawable)
void
addState(int stateId, int resId)
Drawable
getDrawableForState(int[] stateSet)
Non Android accessor to retrieve drawable added for a specific state.int
getResourceIdForState(int stateId)
-
Methods inherited from class org.robolectric.shadows.ShadowDrawable
addCorruptStreamSource, clearCorruptStreamSources, createFromPath, createFromResourceId, createFromResourceStream, createFromStream, getAlpha, getCreatedFromResId, getInputStream, getIntrinsicHeight, getIntrinsicWidth, invalidateSelf, setAlpha, setDefaultIntrinsicHeight, setDefaultIntrinsicWidth, setIntrinsicHeight, setIntrinsicWidth, validate, wasInvalidated
-
-
-
-
Method Detail
-
addState
public void addState(int stateId, int resId)
-
getResourceIdForState
public int getResourceIdForState(int stateId)
-
addState
@Implementation protected void addState(int[] stateSet, Drawable drawable)
-
getDrawableForState
public Drawable getDrawableForState(int[] stateSet)
Non Android accessor to retrieve drawable added for a specific state.- Parameters:
stateSet
- Int array describing the state- Returns:
- Drawable added via
addState(int[], android.graphics.drawable.Drawable)
-
-