# StateListDrawableCompat

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/StateListDrawableCompat.java+class:androidx.appcompat.graphics.drawable.StateListDrawableCompat) Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.6.0)

*** ** * ** ***

<br />

```
class StateListDrawableCompat : DrawableContainerCompat
```

<br />

|---|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.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/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat) ||
|   |   | ↳ | [androidx.appcompat.graphics.drawable.StateListDrawableCompat](https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/StateListDrawableCompat) |

Known direct subclasses [AnimatedStateListDrawableCompat](https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/AnimatedStateListDrawableCompat)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/AnimatedStateListDrawableCompat` | A `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` providing animated transitions between states. |

*** ** * ** ***

Lets you assign a number of graphic images to a single Drawable and swap out the visible item by a string ID value.

It can be defined in an XML file with the `<selector>` element. Each state Drawable is defined in a nested `<item>` element. For more information, see the guide to [Drawable Resources](https://developer.android.com/guide/topics/resources/drawable-resource). `https://developer.android.com/reference/android/R.attr.html#visible``https://developer.android.com/reference/android/R.attr.html#variablePadding``https://developer.android.com/reference/android/R.attr.html#constantSize``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`

Adapted from platform class; altered with API level checks as necessary \&uses `ResourceManagerInternal` for `Drawable` inflation.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/StateListDrawableCompat#StateListDrawableCompat()()` Creates an empty state list drawable. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/StateListDrawableCompat#addState(int[],android.graphics.drawable.Drawable)(stateSet: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!, drawable: https://developer.android.com/reference/android/graphics/drawable/Drawable.html!)` Add a new image/string ID to the set of images. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/StateListDrawableCompat#applyTheme(android.content.res.Resources.Theme)(theme: https://developer.android.com/reference/android/content/res/Resources.Theme.html)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/StateListDrawableCompat#inflate(android.content.Context,android.content.res.Resources,org.xmlpull.v1.XmlPullParser,android.util.AttributeSet,android.content.res.Resources.Theme)( context: https://developer.android.com/reference/android/content/Context.html, r: https://developer.android.com/reference/android/content/res/Resources.html, parser: https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html, attrs: https://developer.android.com/reference/android/util/AttributeSet.html, theme: https://developer.android.com/reference/android/content/res/Resources.Theme.html? )` Inflate this Drawable from an XML resource optionally styled by a theme. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/StateListDrawableCompat#isStateful()()` |
| `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/StateListDrawableCompat#mutate()()` |

| ### Protected functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/StateListDrawableCompat#onStateChange(int[])(stateSet: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>)` |

### Inherited functions

From [android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#applyTheme(android.content.res.Resources.Theme)(t: https://developer.android.com/reference/android/content/res/Resources.Theme.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#canApplyTheme()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#clearColorFilter()()` `https://developer.android.com/reference/android/graphics/Rect.html!` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#copyBounds()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#copyBounds(android.graphics.Rect)(bounds: https://developer.android.com/reference/android/graphics/Rect.html!)` `java-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)(pathName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` `java-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)(

res: https://developer.android.com/reference/android/content/res/Resources.html!,

value: https://developer.android.com/reference/android/util/TypedValue.html!,

is: https://developer.android.com/reference/java/io/InputStream.html!,

srcName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!

)` `java-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)(is: https://developer.android.com/reference/java/io/InputStream.html!, srcName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` `java-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)(r: https://developer.android.com/reference/android/content/res/Resources.html!, parser: https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html!)` `java-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)(

r: https://developer.android.com/reference/android/content/res/Resources.html!,

parser: https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html!,

attrs: https://developer.android.com/reference/android/util/AttributeSet.html!

)` `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#draw(android.graphics.Canvas)(p: https://developer.android.com/reference/android/graphics/Canvas.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getAlpha()()` `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()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `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()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getHotspotBounds(android.graphics.Rect)(outRect: https://developer.android.com/reference/android/graphics/Rect.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getIntrinsicHeight()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getIntrinsicWidth()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getLayoutDirection()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getLevel()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getMinimumHeight()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getMinimumWidth()()` `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getOpacity()()`

**This function is deprecated.**
`https://developer.android.com/reference/android/graphics/Insets.html!` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getOpticalInsets()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getOutline(android.graphics.Outline)(outline: https://developer.android.com/reference/android/graphics/Outline.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getPadding(android.graphics.Rect)(padding: https://developer.android.com/reference/android/graphics/Rect.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!` `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()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#hasFocusStateSpecified()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet)(r: https://developer.android.com/reference/android/content/res/Resources.html!, parser: https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html!, attrs: https://developer.android.com/reference/android/util/AttributeSet.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#invalidateSelf()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isAutoMirrored()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isFilterBitmap()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isProjected()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isStateful()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isVisible()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `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()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onBoundsChange(android.graphics.Rect)(bounds: https://developer.android.com/reference/android/graphics/Rect.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onLayoutDirectionChanged(int)(layoutDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onLevelChange(int)(level: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onStateChange(int[])(state: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!)` `java-static https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#resolveOpacity(int, int)(op1: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, op2: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#scheduleSelf(java.lang.Runnable, long)(what: https://developer.android.com/reference/java/lang/Runnable.html!, when: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setAlpha(int)(p: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setAutoMirrored(boolean)(mirrored: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setBounds(android.graphics.Rect)(bounds: https://developer.android.com/reference/android/graphics/Rect.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setCallback(android.graphics.drawable.Drawable.Callback)(cb: https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setChangingConfigurations(int)(configs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setColorFilter(android.graphics.ColorFilter)(p: https://developer.android.com/reference/android/graphics/ColorFilter.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setDither(boolean)(dither: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setFilterBitmap(boolean)(filter: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setHotspot(float, float)(x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setHotspotBounds(int, int, int, int)(left: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, top: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, right: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bottom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setLayoutDirection(int)(layoutDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setLevel(int)(level: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setState(int[])(stateSet: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTint(int)(tintColor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintBlendMode(android.graphics.BlendMode)(blendMode: https://developer.android.com/reference/android/graphics/BlendMode.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintList(android.content.res.ColorStateList)(tint: https://developer.android.com/reference/android/content/res/ColorStateList.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintMode(android.graphics.PorterDuff.Mode)(tintMode: https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setVisible(boolean, boolean)(visible: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, restart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#unscheduleSelf(java.lang.Runnable)(what: https://developer.android.com/reference/java/lang/Runnable.html!)` From [android.graphics.drawable.Drawable.Callback](https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html) `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html#invalidateDrawable(android.graphics.drawable.Drawable)(p: https://developer.android.com/reference/android/graphics/drawable/Drawable.html!)` `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html#scheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable, long)(p: https://developer.android.com/reference/android/graphics/drawable/Drawable.html!, p1: https://developer.android.com/reference/java/lang/Runnable.html!, p2: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` `abstract https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html#unscheduleDrawable(android.graphics.drawable.Drawable, java.lang.Runnable)(p: https://developer.android.com/reference/android/graphics/drawable/Drawable.html!, p1: https://developer.android.com/reference/java/lang/Runnable.html!)` From [androidx.appcompat.graphics.drawable.DrawableContainerCompat](https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#canApplyTheme()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#draw(android.graphics.Canvas)(canvas: https://developer.android.com/reference/android/graphics/Canvas.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getAlpha()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getChangingConfigurations()()` `https://developer.android.com/reference/android/graphics/drawable/Drawable.ConstantState.html!` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getConstantState()()` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getCurrent()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getHotspotBounds(android.graphics.Rect)(outRect: https://developer.android.com/reference/android/graphics/Rect.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getIntrinsicHeight()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getIntrinsicWidth()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getMinimumHeight()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getMinimumWidth()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getOpacity()()`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getOutline(android.graphics.Outline)(outline: https://developer.android.com/reference/android/graphics/Outline.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#getPadding(android.graphics.Rect)(padding: https://developer.android.com/reference/android/graphics/Rect.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#invalidateDrawable(android.graphics.drawable.Drawable)(who: https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#isAutoMirrored()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#jumpToCurrentState()()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#onBoundsChange(android.graphics.Rect)(bounds: https://developer.android.com/reference/android/graphics/Rect.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#onLayoutDirectionChanged(int)(layoutDirection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#onLevelChange(int)(level: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#scheduleDrawable(android.graphics.drawable.Drawable,java.lang.Runnable,long)(who: https://developer.android.com/reference/android/graphics/drawable/Drawable.html, what: https://developer.android.com/reference/java/lang/Runnable.html, when: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setAlpha(int)(alpha: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setAutoMirrored(boolean)(mirrored: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setColorFilter(android.graphics.ColorFilter)(colorFilter: https://developer.android.com/reference/android/graphics/ColorFilter.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setDither(boolean)(dither: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

**This function is deprecated.**
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setEnterFadeDuration(int)(ms: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Change the global fade duration when a new drawable is entering the scene.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setExitFadeDuration(int)(ms: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Change the global fade duration when a new drawable is leaving the scene.
`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setHotspot(float,float)(x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setHotspotBounds(int,int,int,int)(left: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, top: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, right: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, bottom: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setTint(int)(tintColor: @https://developer.android.com/reference/kotlin/androidx/annotation/ColorInt https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setTintList(android.content.res.ColorStateList)(tint: https://developer.android.com/reference/android/content/res/ColorStateList.html!)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setTintMode(android.graphics.PorterDuff.Mode)(tintMode: https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#setVisible(boolean,boolean)(visible: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, restart: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#unscheduleDrawable(android.graphics.drawable.Drawable,java.lang.Runnable)(who: https://developer.android.com/reference/android/graphics/drawable/Drawable.html, what: https://developer.android.com/reference/java/lang/Runnable.html)`

## Public constructors

### StateListDrawableCompat

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

```
StateListDrawableCompat()
```

Creates an empty state list drawable.

## Public functions

### addState

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

```
fun addState(stateSet: IntArray<Int>!, drawable: Drawable!): Unit
```

Add a new image/string ID to the set of images.

| Parameters |
|---|---|
| `stateSet: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html>!` | - An array of resource Ids to associate with the image. Switch to this image by calling setState(). |
| `drawable: https://developer.android.com/reference/android/graphics/drawable/Drawable.html!` | -The image to show. |

### applyTheme

```
fun applyTheme(theme: Resources.Theme): Unit
```

### inflate

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

```
fun inflate(
    context: Context,
    r: Resources,
    parser: XmlPullParser,
    attrs: AttributeSet,
    theme: Resources.Theme?
): Unit
```

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

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html` | The context in which the inflation takes place |
| `r: https://developer.android.com/reference/android/content/res/Resources.html` | Resources used to resolve attribute values |
| `parser: https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html` | XML parser from which to inflate this Drawable |
| `attrs: https://developer.android.com/reference/android/util/AttributeSet.html` | Base set of attribute values |
| `theme: https://developer.android.com/reference/android/content/res/Resources.Theme.html?` | Theme to apply, may be null |

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

### isStateful

```
fun isStateful(): Boolean
```

### mutate

```
fun mutate(): Drawable
```

## Protected functions

### onStateChange

```
protected fun onStateChange(stateSet: IntArray<Int>): Boolean
```