Class ShadowStateListDrawable

java.lang.Object
org.robolectric.shadows.ShadowDrawable
org.robolectric.shadows.ShadowStateListDrawable

@Implements(StateListDrawable.class) public class ShadowStateListDrawable extends ShadowDrawable
  • Constructor Details

    • ShadowStateListDrawable

      public ShadowStateListDrawable()
  • Method Details

    • __constructor__

      @Filter(order=AFTER) protected void __constructor__(Object state, Resources resources)
      Preserves resource IDs when Android clones a selector's constant state.
    • mutate

      @Implementation protected Drawable mutate()
      Runs Android mutation while retaining resource IDs on recreated children.
    • getDrawableForState

      public Drawable getDrawableForState(int[] stateSet)
      Returns the drawable associated with an exact state set.
      Parameters:
      stateSet - Int array describing the state
      Returns:
      Drawable associated with the state, or null if none matches