# PlaybackControlsRow.MultiAction

# PlaybackControlsRow.MultiAction

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

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow.MultiAction "View this page in Java")

<br />

```
abstract class PlaybackControlsRow.MultiAction : Action
```

<br />

|---|---|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)                                                                                        |||
| ↳ | [androidx.leanback.widget.Action](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action)                                                      ||
|   | ↳ | [androidx.leanback.widget.PlaybackControlsRow.MultiAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction) |

Known direct subclasses  
[PlaybackControlsRow.ClosedCaptioningAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.ClosedCaptioningAction),[PlaybackControlsRow.FastForwardAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.FastForwardAction),[PlaybackControlsRow.HighQualityAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.HighQualityAction),[PlaybackControlsRow.PlayPauseAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.PlayPauseAction),[PlaybackControlsRow.RepeatAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RepeatAction),[PlaybackControlsRow.RewindAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RewindAction),[PlaybackControlsRow.ShuffleAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.ShuffleAction),[PlaybackControlsRow.ThumbsAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.ThumbsAction)  

|------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|
| [PlaybackControlsRow.ClosedCaptioningAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.ClosedCaptioningAction) | An action for displaying a CC (Closed Captioning) icon.          |
| [PlaybackControlsRow.FastForwardAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.FastForwardAction)           | An action displaying an icon for fast forward.                   |
| [PlaybackControlsRow.HighQualityAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.HighQualityAction)           | An action for displaying a HQ (High Quality) icon.               |
| [PlaybackControlsRow.PlayPauseAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.PlayPauseAction)               | An action displaying icons for play and pause.                   |
| [PlaybackControlsRow.RepeatAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RepeatAction)                     | An action for displaying three repeat states: none, one, or all. |
| [PlaybackControlsRow.RewindAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RewindAction)                     | An action displaying an icon for rewind.                         |
| [PlaybackControlsRow.ShuffleAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.ShuffleAction)                   | An action for displaying a shuffle icon.                         |
| [PlaybackControlsRow.ThumbsAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.ThumbsAction)                     | A base class for displaying a thumbs action.                     |

Known indirect subclasses  
[PlaybackControlsRow.ThumbsDownAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.ThumbsDownAction),[PlaybackControlsRow.ThumbsUpAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.ThumbsUpAction)  

|------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| [PlaybackControlsRow.ThumbsDownAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.ThumbsDownAction) | An action displaying an icon for thumbs down. |
| [PlaybackControlsRow.ThumbsUpAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.ThumbsUpAction)     | An action displaying an icon for thumbs up.   |

*** ** * ** ***

Base class for an action comprised of a series of icons.

## Summary

|                                                                                                         ### Public constructors                                                                                                          |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [MultiAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction#MultiAction(int))`(id: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Constructor |

|                                      ### Public functions                                      |
|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                    | [getActionCount](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction#getActionCount())`()` Returns the number of actions.                                                                                                                                                                                                                                |
| [Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)`!` | [getDrawable](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction#getDrawable(int))`(index: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Returns the drawable at the given index.                                                                                                                                     |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                    | [getIndex](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction#getIndex())`()` Returns the current index.                                                                                                                                                                                                                                                |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!`           | [getLabel](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction#getLabel(int))`(index: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Returns the label at the given index.                                                                                                                                              |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!`           | [getSecondaryLabel](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction#getSecondaryLabel(int))`(index: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Returns the secondary label at the given index.                                                                                                                  |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [nextIndex](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction#nextIndex())`()` Increments the index, wrapping to zero once the end is reached.                                                                                                                                                                                                         |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [setDrawables](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction#setDrawables(android.graphics.drawable.Drawable[]))`(drawables: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)`!>!)` Sets the array of drawables.     |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [setIndex](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction#setIndex(int))`(index: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Sets the current index.                                                                                                                                                            |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [setLabels](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction#setLabels(java.lang.String[]))`(labels: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!>!)` Sets the array of strings used as labels.                             |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                  | [setSecondaryLabels](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction#setSecondaryLabels(java.lang.String[]))`(labels: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!>!)` Sets the array of strings used as secondary labels. |

|                                                                                                                                                                                                                                                                                          ### Inherited Constants                                                                                                                                                                                                                                                                                          |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[androidx.leanback.widget.Action](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action) |---------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| | `const `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | [NO_ID](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#NO_ID())` = -1` Indicates that an id has not been set. | |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[androidx.leanback.widget.Action](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action) |---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                     | [addKeyCode](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#addKeyCode(int))`(keyCode: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Adds a keycode used to invoke this Action.                                     | | [Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)`?`    | [getIcon](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#getIcon())`()` Returns the icon drawable for this Action.                                                                                                                                    | | [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                     | [getId](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#getId())`()` Returns the id for this Action.                                                                                                                                                   | | [CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`?` | [getLabel1](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#getLabel1())`()` Returns the first line label for this Action.                                                                                                                             | | [CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`?` | [getLabel2](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#getLabel2())`()` Returns the second line label for this Action.                                                                                                                            | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                     | [removeKeyCode](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#removeKeyCode(int))`(keyCode: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Removes a keycode used to invoke this Action.                            | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)               | [respondsToKeyCode](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#respondsToKeyCode(int))`(keyCode: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Returns true if the Action should respond to the given keycode.  | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                     | [setIcon](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#setIcon(android.graphics.drawable.Drawable))`(icon: `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)`?)` Sets the icon drawable for this Action. | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                     | [setId](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#setId(long))`(id: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Sets the id for this Action.                                                               | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                     | [setLabel1](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#setLabel1(java.lang.CharSequence))`(label: `[CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`?)` Sets the first line label for this Action.  | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                     | [setLabel2](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#setLabel2(java.lang.CharSequence))`(label: `[CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)`?)` Sets the second line label for this Action. | | [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)                 | [toString](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action#toString())`()`                                                                                                                                                                             | |

## Public constructors

### MultiAction

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

```
MultiAction(id: Int)
```

Constructor  

|                                    Parameters                                     |
|-----------------------------------------------------------------------------------|-----------------------|
| `id: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | The id of the Action. |

## Public functions

### getActionCount

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

```
fun getActionCount(): Int
```

Returns the number of actions.  

### getDrawable

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

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

Returns the drawable at the given index.  

### getIndex

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

```
fun getIndex(): Int
```

Returns the current index.  

### getLabel

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

```
fun getLabel(index: Int): String!
```

Returns the label at the given index.  

### getSecondaryLabel

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

```
fun getSecondaryLabel(index: Int): String!
```

Returns the secondary label at the given index.  

### nextIndex

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

```
fun nextIndex(): Unit
```

Increments the index, wrapping to zero once the end is reached.  

### setDrawables

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

```
fun setDrawables(drawables: Array<Drawable!>!): Unit
```

Sets the array of drawables. The size of the array defines the range of valid indices for this action.  

### setIndex

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

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

Sets the current index.  

### setLabels

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

```
fun setLabels(labels: Array<String!>!): Unit
```

Sets the array of strings used as labels. The size of the array defines the range of valid indices for this action. The labels are used to define the accessibility content description unless secondary labels are provided.  

### setSecondaryLabels

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

```
fun setSecondaryLabels(labels: Array<String!>!): Unit
```

Sets the array of strings used as secondary labels. These labels are used in place of the primary labels for accessibility content description only.