# AnimatedStateListDrawableCompat

Artifact: [androidx.appcompat:appcompat-resources](https://developer.android.com/jetpack/androidx/releases/appcompat) [View Source](https://cs.android.com/search?q=file:androidx/appcompat/graphics/drawable/AnimatedStateListDrawableCompat.java+class:androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

*** ** * ** ***


```
public class AnimatedStateListDrawableCompat extends StateListDrawableCompat
```

<br />

|---|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||||
| ↳ | [android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) ||||
|   | ↳ | [androidx.appcompat.graphics.drawable.DrawableContainerCompat](https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat) |||
|   |   | ↳ | [androidx.appcompat.graphics.drawable.StateListDrawableCompat](https://developer.android.com/reference/androidx/appcompat/graphics/drawable/StateListDrawableCompat) ||
|   |   |   | ↳ | [androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat](https://developer.android.com/reference/androidx/appcompat/graphics/drawable/AnimatedStateListDrawableCompat) |

*** ** * ** ***

A `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` providing animated transitions between states.

A port of `https://developer.android.com/reference/android/graphics/drawable/AnimatedStateListDrawable.html` compatible with older versions of the platform.

This drawable can be defined in an XML file with the `
<animated-selector>` element. Each keyframe Drawable is defined in a nested `<item>` element. Transitions are defined in a nested `<transition>` element.

Notable exceptions not supported by this class:

- `drawable`s defined as children of `<item>`s or `<transition>`s (**except** vectors) ignore theme attributes prior to API level 21
- Animated vector transitions do not support reversing prior to API level 24

`https://developer.android.com/reference/android/R.attr.html#state_focused``https://developer.android.com/reference/android/R.attr.html#state_window_focused``https://developer.android.com/reference/android/R.attr.html#state_enabled``https://developer.android.com/reference/android/R.attr.html#state_checkable``https://developer.android.com/reference/android/R.attr.html#state_checked``https://developer.android.com/reference/android/R.attr.html#state_selected``https://developer.android.com/reference/android/R.attr.html#state_activated``https://developer.android.com/reference/android/R.attr.html#state_active``https://developer.android.com/reference/android/R.attr.html#state_single``https://developer.android.com/reference/android/R.attr.html#state_first``https://developer.android.com/reference/android/R.attr.html#state_middle``https://developer.android.com/reference/android/R.attr.html#state_last``https://developer.android.com/reference/android/R.attr.html#state_pressed`

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/AnimatedStateListDrawableCompat#AnimatedStateListDrawableCompat()()` |

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/AnimatedStateListDrawableCompat#addState(int[],android.graphics.drawable.Drawable,int)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html int[] stateSet, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable, int id)` Add a new drawable to the set of keyframes. |
| `void` | `<T extends https://developer.android.com/reference/android/graphics/drawable/Drawable.html & https://developer.android.com/reference/android/graphics/drawable/Animatable.html> https://developer.android.com/reference/androidx/appcompat/graphics/drawable/AnimatedStateListDrawableCompat#addTransition(int,int,T,boolean)( int fromId, int toId, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T transition, boolean reversible )` Adds a new transition between keyframes. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/appcompat/graphics/drawable/AnimatedStateListDrawableCompat` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/AnimatedStateListDrawableCompat#create(android.content.Context,int,android.content.res.Resources.Theme)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context, @https://developer.android.com/reference/androidx/annotation/DrawableRes int resId, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/content/res/Resources.Theme.html theme )` Creates an AnimatedStateListDrawableCompat. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/appcompat/graphics/drawable/AnimatedStateListDrawableCompat` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/AnimatedStateListDrawableCompat#createFromXmlInner(android.content.Context,android.content.res.Resources,org.xmlpull.v1.XmlPullParser,android.util.AttributeSet,android.content.res.Resources.Theme)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/res/Resources.html resources, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html parser, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/util/AttributeSet.html attrs, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/content/res/Resources.Theme.html theme )` Create a AnimatedStateListDrawableCompat from inside an XML document using an optional `https://developer.android.com/reference/android/content/res/Resources.Theme.html`. |
| `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/AnimatedStateListDrawableCompat#inflate(android.content.Context,android.content.res.Resources,org.xmlpull.v1.XmlPullParser,android.util.AttributeSet,android.content.res.Resources.Theme)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/res/Resources.html resources, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html parser, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/util/AttributeSet.html attrs, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/content/res/Resources.Theme.html theme )` Inflate this Drawable from an XML resource optionally styled by a theme. |
| `boolean` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/AnimatedStateListDrawableCompat#isStateful()()` |
| `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/AnimatedStateListDrawableCompat#jumpToCurrentState()()` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/AnimatedStateListDrawableCompat#mutate()()` |
| `boolean` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/AnimatedStateListDrawableCompat#setVisible(boolean,boolean)(boolean visible, boolean restart)` |

| ### Protected methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/AnimatedStateListDrawableCompat#onStateChange(int[])(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html int[] stateSet)` |

| ### Inherited methods |
|---|
| From [android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) |---|---| | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#applyTheme(android.content.res.Resources.Theme)(https://developer.android.com/reference/android/content/res/Resources.Theme.html t)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#canApplyTheme()()` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#clearColorFilter()()` | | `final https://developer.android.com/reference/android/graphics/Rect.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#copyBounds()()` | | `final void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#copyBounds(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect.html bounds)` | | `static https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromPath(java.lang.String)(https://developer.android.com/reference/java/lang/String.html pathName)` | | `static https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromResourceStream(android.content.res.Resources, android.util.TypedValue, java.io.InputStream, java.lang.String)( https://developer.android.com/reference/android/content/res/Resources.html res, https://developer.android.com/reference/android/util/TypedValue.html value, https://developer.android.com/reference/java/io/InputStream.html is, https://developer.android.com/reference/java/lang/String.html srcName )` | | `static https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromStream(java.io.InputStream, java.lang.String)(https://developer.android.com/reference/java/io/InputStream.html is, https://developer.android.com/reference/java/lang/String.html srcName)` | | `static https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromXml(android.content.res.Resources, org.xmlpull.v1.XmlPullParser)(https://developer.android.com/reference/android/content/res/Resources.html r, https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html parser)` | | `static https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromXmlInner(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet)( https://developer.android.com/reference/android/content/res/Resources.html r, https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html parser, https://developer.android.com/reference/android/util/AttributeSet.html attrs )` | | `abstract void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#draw(android.graphics.Canvas)(https://developer.android.com/reference/android/graphics/Canvas.html p)` | | `int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getAlpha()()` | | `final https://developer.android.com/reference/android/graphics/Rect.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getBounds()()` | | `https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getCallback()()` | | `int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getChangingConfigurations()()` | | `https://developer.android.com/reference/android/graphics/ColorFilter.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getColorFilter()()` | | `https://developer.android.com/reference/android/graphics/drawable/Drawable.ConstantState.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getConstantState()()` | | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getCurrent()()` | | `https://developer.android.com/reference/android/graphics/Rect.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getDirtyBounds()()` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getHotspotBounds(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect.html outRect)` | | `int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getIntrinsicHeight()()` | | `int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getIntrinsicWidth()()` | | `int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getLayoutDirection()()` | | `final int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getLevel()()` | | `int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getMinimumHeight()()` | | `int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getMinimumWidth()()` | | `abstract int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getOpacity()()` **This method is deprecated.** | | `https://developer.android.com/reference/android/graphics/Insets.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getOpticalInsets()()` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getOutline(android.graphics.Outline)(https://developer.android.com/reference/android/graphics/Outline.html outline)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getPadding(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect.html padding)` | | `int[]` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getState()()` | | `https://developer.android.com/reference/android/graphics/Region.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getTransparentRegion()()` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#hasFocusStateSpecified()()` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet)(https://developer.android.com/reference/android/content/res/Resources.html r, https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html parser, https://developer.android.com/reference/android/util/AttributeSet.html attrs)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#invalidateSelf()()` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isAutoMirrored()()` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isFilterBitmap()()` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isProjected()()` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isStateful()()` | | `final boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isVisible()()` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#jumpToCurrentState()()` | | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#mutate()()` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onBoundsChange(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect.html bounds)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onLayoutDirectionChanged(int)(int layoutDirection)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onLevelChange(int)(int level)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onStateChange(int[])(int[] state)` | | `static int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#resolveOpacity(int, int)(int op1, int op2)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#scheduleSelf(java.lang.Runnable, long)(https://developer.android.com/reference/java/lang/Runnable.html what, long when)` | | `abstract void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setAlpha(int)(int p)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setAutoMirrored(boolean)(boolean mirrored)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setBounds(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect.html bounds)` | | `final void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setCallback(android.graphics.drawable.Drawable.Callback)(https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html cb)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setChangingConfigurations(int)(int configs)` | | `abstract void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setColorFilter(android.graphics.ColorFilter)(https://developer.android.com/reference/android/graphics/ColorFilter.html p)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setDither(boolean)(boolean dither)` **This method is deprecated.** | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setFilterBitmap(boolean)(boolean filter)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setHotspot(float, float)(float x, float y)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setHotspotBounds(int, int, int, int)(int left, int top, int right, int bottom)` | | `final boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setLayoutDirection(int)(int layoutDirection)` | | `final boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setLevel(int)(int level)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setState(int[])(int[] stateSet)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTint(int)(int tintColor)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintBlendMode(android.graphics.BlendMode)(https://developer.android.com/reference/android/graphics/BlendMode.html blendMode)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintList(android.content.res.ColorStateList)(https://developer.android.com/reference/android/content/res/ColorStateList.html tint)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintMode(android.graphics.PorterDuff.Mode)(https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html tintMode)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setVisible(boolean, boolean)(boolean visible, boolean restart)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#unscheduleSelf(java.lang.Runnable)(https://developer.android.com/reference/java/lang/Runnable.html what)` | |
| From [android.graphics.drawable.Drawable.Callback](https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html) |---|---| | `abstract void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html#invalidateDrawable(android.graphics.drawable.Drawable)(https://developer.android.com/reference/android/graphics/drawable/Drawable.html p)` | | `abstract void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html#scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long)(https://developer.android.com/reference/android/graphics/drawable/Drawable.html p, https://developer.android.com/reference/java/lang/Runnable.html p1, long p2)` | | `abstract void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html#unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable)(https://developer.android.com/reference/android/graphics/drawable/Drawable.html p, https://developer.android.com/reference/java/lang/Runnable.html p1)` | |
| From [androidx.appcompat.graphics.drawable.DrawableContainerCompat](https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat) |---|---| | `boolean` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#canApplyTheme()()` | | `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#draw(android.graphics.Canvas)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/Canvas.html canvas)` | | `int` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getAlpha()()` | | `int` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getChangingConfigurations()()` | | `final https://developer.android.com/reference/android/graphics/drawable/Drawable.ConstantState.html` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getConstantState()()` | | `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getCurrent()()` | | `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getHotspotBounds(android.graphics.Rect)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/Rect.html outRect)` | | `int` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getIntrinsicHeight()()` | | `int` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getIntrinsicWidth()()` | | `int` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getMinimumHeight()()` | | `int` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getMinimumWidth()()` | | `int` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getOpacity()()` **This method is deprecated.** | | `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getOutline(android.graphics.Outline)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/Outline.html outline)` | | `boolean` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getPadding(android.graphics.Rect)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/Rect.html padding)` | | `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#invalidateDrawable(android.graphics.drawable.Drawable)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html who)` | | `boolean` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#isAutoMirrored()()` | | `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#onBoundsChange(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect.html bounds)` | | `boolean` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#onLayoutDirectionChanged(int)(int layoutDirection)` | | `boolean` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#onLevelChange(int)(int level)` | | `boolean` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#onStateChange(int[])(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html int[] state)` | | `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#scheduleDrawable(android.graphics.drawable.Drawable,java.lang.Runnable,long)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html who, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/Runnable.html what, long when)` | | `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setAlpha(int)(int alpha)` | | `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setAutoMirrored(boolean)(boolean mirrored)` | | `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setColorFilter(android.graphics.ColorFilter)(https://developer.android.com/reference/android/graphics/ColorFilter.html colorFilter)` | | `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setDither(boolean)(boolean dither)` **This method is deprecated.** | | `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setEnterFadeDuration(int)(int ms)` Change the global fade duration when a new drawable is entering the scene. | | `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setExitFadeDuration(int)(int ms)` Change the global fade duration when a new drawable is leaving the scene. | | `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setHotspot(float,float)(float x, float y)` | | `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setHotspotBounds(int,int,int,int)(int left, int top, int right, int bottom)` | | `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setTint(int)(@https://developer.android.com/reference/androidx/annotation/ColorInt int tintColor)` | | `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setTintMode(android.graphics.PorterDuff.Mode)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html tintMode)` | | `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/DrawableContainerCompat#unscheduleDrawable(android.graphics.drawable.Drawable,java.lang.Runnable)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html who, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/Runnable.html what)` | |
| From [androidx.appcompat.graphics.drawable.StateListDrawableCompat](https://developer.android.com/reference/androidx/appcompat/graphics/drawable/StateListDrawableCompat) |---|---| | `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/StateListDrawableCompat#addState(int[],android.graphics.drawable.Drawable)(int[] stateSet, https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable)` Add a new image/string ID to the set of images. | | `void` | `https://developer.android.com/reference/androidx/appcompat/graphics/drawable/StateListDrawableCompat#applyTheme(android.content.res.Resources.Theme)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/res/Resources.Theme.html theme)` | |

## Public constructors

### AnimatedStateListDrawableCompat

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public AnimatedStateListDrawableCompat()
```

## Public methods

### addState

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public void addState(@NonNull int[] stateSet, @NonNull Drawable drawable, int id)
```

Add a new drawable to the set of keyframes.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html int[] stateSet` | An array of resource IDs to associate with the keyframe |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable` | The drawable to show when in the specified state, may not be null |
| `int id` | The unique identifier for the keyframe |

### addTransition

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public void <T extends Drawable & Animatable> addTransition(
    int fromId,
    int toId,
    @NonNull T transition,
    boolean reversible
)
```

Adds a new transition between keyframes.

| Parameters |
|---|---|
| `int fromId` | Unique identifier of the starting keyframe |
| `int toId` | Unique identifier of the ending keyframe |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T transition` | An `https://developer.android.com/reference/android/graphics/drawable/Animatable.html` drawable to use as a transition, may not be null |
| `boolean reversible` | Whether the transition can be reversed |

### create

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public static @Nullable AnimatedStateListDrawableCompat create(
    @NonNull Context context,
    @DrawableRes int resId,
    @Nullable Resources.Theme theme
)
```

Creates an AnimatedStateListDrawableCompat.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context` | context to inflate against |
| `@https://developer.android.com/reference/androidx/annotation/DrawableRes int resId` | the resource ID for AnimatedStateListDrawable object. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/content/res/Resources.Theme.html theme` | the theme to apply, may be null. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/appcompat/graphics/drawable/AnimatedStateListDrawableCompat` | a new AnimatedStateListDrawableCompat or null if parsing error is found. |

### createFromXmlInner

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public static @NonNull AnimatedStateListDrawableCompat createFromXmlInner(
    @NonNull Context context,
    @NonNull Resources resources,
    @NonNull XmlPullParser parser,
    @NonNull AttributeSet attrs,
    @Nullable Resources.Theme theme
)
```

Create a AnimatedStateListDrawableCompat from inside an XML document using an optional `https://developer.android.com/reference/android/content/res/Resources.Theme.html`. Called on a parser positioned at a tag in an XML document, tries to create an AnimatedStateListDrawableCompat from that tag.

| Throws |
|---|---|
| `https://developer.android.com/reference/java/io/IOException.html` |   |
| `https://developer.android.com/reference/org/xmlpull/v1/XmlPullParserException.html` |   |

### inflate

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
public void inflate(
    @NonNull Context context,
    @NonNull Resources resources,
    @NonNull XmlPullParser parser,
    @NonNull AttributeSet attrs,
    @Nullable Resources.Theme theme
)
```

Inflate this Drawable from an XML resource optionally styled by a theme. This can't be called more than once for each Drawable.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/Context.html context` | context to inflate against |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/res/Resources.html resources` | Resources used to resolve attribute values |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html parser` | XML parser from which to inflate this Drawable |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/util/AttributeSet.html attrs` | Base set of attribute values |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/content/res/Resources.Theme.html theme` | Theme to apply, may be null |

| Throws |
|---|---|
| `https://developer.android.com/reference/org/xmlpull/v1/XmlPullParserException.html` | if the XML is malformed |
| `https://developer.android.com/reference/java/io/IOException.html` | if the XML could not be read |

### isStateful

```
public boolean isStateful()
```

### jumpToCurrentState

```
public void jumpToCurrentState()
```

### mutate

```
public @NonNull Drawable mutate()
```

### setVisible

```
public boolean setVisible(boolean visible, boolean restart)
```

## Protected methods

### onStateChange

```
protected boolean onStateChange(@NonNull int[] stateSet)
```