# DrawableContainerCompat

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

*** ** * ** ***

<br />

```
class DrawableContainerCompat : Drawable, Drawable.Callback
```

<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) |

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

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/StateListDrawableCompat` | Lets you assign a number of graphic images to a single Drawable and swap out the visible item by a string ID value. |

Known indirect 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. |

*** ** * ** ***

A helper class that contains several `https://developer.android.com/reference/android/graphics/drawable/Drawable.html`s and selects which one to use.

Adapted from platform class, altered with API level checks as necessary.

## Summary

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

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#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/-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/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#isStateful()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#jumpToCurrentState()()` |
| `https://developer.android.com/reference/android/graphics/drawable/Drawable.html!` | `https://developer.android.com/reference/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#mutate()()` |
| `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/-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)` |

| ### Protected functions |
|---|---|
| `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#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/kotlin/androidx/appcompat/graphics/drawable/DrawableContainerCompat#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>)` |

### 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#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!

)` `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://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/Rect.html!` `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getDirtyBounds()()` `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://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/-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#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#isVisible()()` `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)` `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)` `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/-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#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#unscheduleSelf(java.lang.Runnable)(what: https://developer.android.com/reference/java/lang/Runnable.html!)`

## Public constructors

### DrawableContainerCompat

Added in 1.6.0

```
DrawableContainerCompat()
```

## Public functions

### applyTheme

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

### canApplyTheme

```
fun canApplyTheme(): Boolean
```

### draw

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

```
fun draw(canvas: Canvas): Unit
```

### getAlpha

```
fun getAlpha(): Int
```

### getChangingConfigurations

```
fun getChangingConfigurations(): Int
```

### getConstantState

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

```
fun getConstantState(): Drawable.ConstantState!
```

### getCurrent

```
fun getCurrent(): Drawable
```

### getHotspotBounds

```
fun getHotspotBounds(outRect: Rect): Unit
```

### getIntrinsicHeight

```
fun getIntrinsicHeight(): Int
```

### getIntrinsicWidth

```
fun getIntrinsicWidth(): Int
```

### getMinimumHeight

```
fun getMinimumHeight(): Int
```

### getMinimumWidth

```
fun getMinimumWidth(): Int
```

### getOpacity

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

```
fun getOpacity(): Int
```

> [!CAUTION]
> **This function is deprecated.**   

### getOutline

```
fun getOutline(outline: Outline): Unit
```

### getPadding

```
fun getPadding(padding: Rect): Boolean
```

### invalidateDrawable

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

```
fun invalidateDrawable(who: Drawable): Unit
```

### isAutoMirrored

```
fun isAutoMirrored(): Boolean
```

### isStateful

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

### jumpToCurrentState

```
fun jumpToCurrentState(): Unit
```

### mutate

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

### onLayoutDirectionChanged

```
fun onLayoutDirectionChanged(layoutDirection: Int): Boolean
```

### scheduleDrawable

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

```
fun scheduleDrawable(who: Drawable, what: Runnable, when: Long): Unit
```

### setAlpha

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

```
fun setAlpha(alpha: Int): Unit
```

### setAutoMirrored

```
fun setAutoMirrored(mirrored: Boolean): Unit
```

### setColorFilter

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

```
fun setColorFilter(colorFilter: ColorFilter!): Unit
```

### setDither

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

```
fun setDither(dither: Boolean): Unit
```

> [!CAUTION]
> **This function is deprecated.**   

### setEnterFadeDuration

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

```
fun setEnterFadeDuration(ms: Int): Unit
```

Change the global fade duration when a new drawable is entering the scene.

| Parameters |
|---|---|
| `ms: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The amount of time to fade in milliseconds. |

### setExitFadeDuration

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

```
fun setExitFadeDuration(ms: Int): Unit
```

Change the global fade duration when a new drawable is leaving the scene.

| Parameters |
|---|---|
| `ms: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The amount of time to fade in milliseconds. |

### setHotspot

```
fun setHotspot(x: Float, y: Float): Unit
```

### setHotspotBounds

```
fun setHotspotBounds(left: Int, top: Int, right: Int, bottom: Int): Unit
```

### setTint

```
fun setTint(tintColor: @ColorInt Int): Unit
```

### setTintList

```
fun setTintList(tint: ColorStateList!): Unit
```

### setTintMode

```
fun setTintMode(tintMode: PorterDuff.Mode): Unit
```

### setVisible

```
fun setVisible(visible: Boolean, restart: Boolean): Boolean
```

### unscheduleDrawable

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

```
fun unscheduleDrawable(who: Drawable, what: Runnable): Unit
```

## Protected functions

### onBoundsChange

```
protected fun onBoundsChange(bounds: Rect!): Unit
```

### onLevelChange

```
protected fun onLevelChange(level: Int): Boolean
```

### onStateChange

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