# CompositeDrawable

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

*** ** * ** ***

<br />

```
class CompositeDrawable : 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.leanback.graphics.CompositeDrawable](https://developer.android.com/reference/kotlin/androidx/leanback/graphics/CompositeDrawable) |

*** ** * ** ***

Generic drawable class that can be composed of multiple children. Whenever the bounds changes for this class, it updates those of its children.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/leanback/graphics/CompositeDrawable.ChildDrawable` Wrapper class holding a drawable object and `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/BoundsRule` to update drawable bounds when parent bound changes. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/CompositeDrawable#CompositeDrawable()()` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/CompositeDrawable#addChildDrawable(android.graphics.drawable.Drawable)(drawable: https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` Adds the supplied region. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/CompositeDrawable#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/leanback/graphics/CompositeDrawable#getAlpha()()` |
| `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/CompositeDrawable.ChildDrawable` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/CompositeDrawable#getChildAt(int)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/CompositeDrawable.ChildDrawable` at the given index. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/CompositeDrawable#getChildCount()()` Returns the total number of children. |
| `https://developer.android.com/reference/android/graphics/drawable/Drawable.ConstantState.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/CompositeDrawable#getConstantState()()` |
| `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/CompositeDrawable#getDrawable(int)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` for the given index. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/CompositeDrawable#getOpacity()()` **This function is deprecated.** |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/CompositeDrawable#invalidateDrawable(android.graphics.drawable.Drawable)(who: https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` |
| `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/CompositeDrawable#mutate()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/CompositeDrawable#removeChild(int)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Removes the child corresponding to the given index. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/CompositeDrawable#removeDrawable(android.graphics.drawable.Drawable)(drawable: https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` Removes the given region. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/CompositeDrawable#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/leanback/graphics/CompositeDrawable#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/leanback/graphics/CompositeDrawable#setChildDrawableAt(int,android.graphics.drawable.Drawable)(index: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, drawable: https://developer.android.com/reference/android/graphics/drawable/Drawable.html)` Sets the supplied region at given index. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/CompositeDrawable#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/leanback/graphics/CompositeDrawable#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/leanback/graphics/CompositeDrawable#onBoundsChange(android.graphics.Rect)(bounds: https://developer.android.com/reference/android/graphics/Rect.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!

)` `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.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()()` `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://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)` `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)` `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!)`

## Public constructors

### CompositeDrawable

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

```
CompositeDrawable()
```

## Public functions

### addChildDrawable

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

```
fun addChildDrawable(drawable: Drawable): Unit
```

Adds the supplied region.

### draw

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

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

### getAlpha

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

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | Alpha value between 0(inclusive) and 255(inclusive) |

### getChildAt

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

```
fun getChildAt(index: Int): CompositeDrawable.ChildDrawable
```

Returns the `https://developer.android.com/reference/kotlin/androidx/leanback/graphics/CompositeDrawable.ChildDrawable` at the given index.

### getChildCount

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

```
fun getChildCount(): Int
```

Returns the total number of children.

### getConstantState

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

### getDrawable

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

```
fun getDrawable(index: Int): Drawable
```

Returns the `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` for the given index.

### getOpacity

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

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

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

### invalidateDrawable

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

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

### mutate

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

### removeChild

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

```
fun removeChild(index: Int): Unit
```

Removes the child corresponding to the given index.

### removeDrawable

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

```
fun removeDrawable(drawable: Drawable): Unit
```

Removes the given region.

### scheduleDrawable

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

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

### setAlpha

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

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

### setChildDrawableAt

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

```
fun setChildDrawableAt(index: Int, drawable: Drawable): Unit
```

Sets the supplied region at given index.

### setColorFilter

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

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

### unscheduleDrawable

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

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

## Protected functions

### onBoundsChange

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