Class ShadowStateListDrawable
java.lang.Object
org.robolectric.shadows.ShadowDrawable
org.robolectric.shadows.ShadowStateListDrawable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void__constructor__(Object state, Resources resources) Preserves resource IDs when Android clones a selector's constant state.getDrawableForState(int[] stateSet) Returns the drawable associated with an exact state set.protected Drawablemutate()Runs Android mutation while retaining resource IDs on recreated children.Methods inherited from class ShadowDrawable
createFromResourceId, getCreatedFromResId, getInputStream, invalidateSelf, setCreatedFromResId, validate, wasInvalidated
-
Constructor Details
-
ShadowStateListDrawable
public ShadowStateListDrawable()
-
-
Method Details
-
__constructor__
-
mutate
Runs Android mutation while retaining resource IDs on recreated children. -
getDrawableForState
Returns the drawable associated with an exact state set.- Parameters:
stateSet- Int array describing the state- Returns:
- Drawable associated with the state, or
nullif none matches
-