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

*** ** * ** ***


```
public abstract class PlaybackControlsRow.MultiAction extends Action
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.leanback.widget.Action](https://developer.android.com/reference/androidx/leanback/widget/Action) ||
|   | ↳ | [androidx.leanback.widget.PlaybackControlsRow.MultiAction](https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow.MultiAction) |

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

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

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

|---|---|
| `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow.ThumbsDownAction` | An action displaying an icon for thumbs down. |
| `https://developer.android.com/reference/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 |
|---|
| `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow.MultiAction#MultiAction(int)(int id)` Constructor |

| ### Public methods |
|---|---|
| `int` | `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow.MultiAction#getActionCount()()` Returns the number of actions. |
| `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow.MultiAction#getDrawable(int)(int index)` Returns the drawable at the given index. |
| `int` | `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow.MultiAction#getIndex()()` Returns the current index. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow.MultiAction#getLabel(int)(int index)` Returns the label at the given index. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow.MultiAction#getSecondaryLabel(int)(int index)` Returns the secondary label at the given index. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow.MultiAction#nextIndex()()` Increments the index, wrapping to zero once the end is reached. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow.MultiAction#setDrawables(android.graphics.drawable.Drawable[])(Drawable[] drawables)` Sets the array of drawables. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow.MultiAction#setIndex(int)(int index)` Sets the current index. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow.MultiAction#setLabels(java.lang.String[])(String[] labels)` Sets the array of strings used as labels. |
| `void` | `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow.MultiAction#setSecondaryLabels(java.lang.String[])(String[] labels)` Sets the array of strings used as secondary labels. |

| ### Inherited Constants |
|---|
| From [androidx.leanback.widget.Action](https://developer.android.com/reference/androidx/leanback/widget/Action) |---|---| | `static final long` | `https://developer.android.com/reference/androidx/leanback/widget/Action#NO_ID() = -1` Indicates that an id has not been set. | |

| ### Inherited methods |
|---|
| From [androidx.leanback.widget.Action](https://developer.android.com/reference/androidx/leanback/widget/Action) |---|---| | `final void` | `https://developer.android.com/reference/androidx/leanback/widget/Action#addKeyCode(int)(int keyCode)` Adds a keycode used to invoke this Action. | | `final @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/androidx/leanback/widget/Action#getIcon()()` Returns the icon drawable for this Action. | | `final long` | `https://developer.android.com/reference/androidx/leanback/widget/Action#getId()()` Returns the id for this Action. | | `final @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | `https://developer.android.com/reference/androidx/leanback/widget/Action#getLabel1()()` Returns the first line label for this Action. | | `final @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | `https://developer.android.com/reference/androidx/leanback/widget/Action#getLabel2()()` Returns the second line label for this Action. | | `final void` | `https://developer.android.com/reference/androidx/leanback/widget/Action#removeKeyCode(int)(int keyCode)` Removes a keycode used to invoke this Action. | | `final boolean` | `https://developer.android.com/reference/androidx/leanback/widget/Action#respondsToKeyCode(int)(int keyCode)` Returns true if the Action should respond to the given keycode. | | `final void` | `https://developer.android.com/reference/androidx/leanback/widget/Action#setIcon(android.graphics.drawable.Drawable)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html icon)` Sets the icon drawable for this Action. | | `final void` | `https://developer.android.com/reference/androidx/leanback/widget/Action#setId(long)(long id)` Sets the id for this Action. | | `final void` | `https://developer.android.com/reference/androidx/leanback/widget/Action#setLabel1(java.lang.CharSequence)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html label)` Sets the first line label for this Action. | | `final void` | `https://developer.android.com/reference/androidx/leanback/widget/Action#setLabel2(java.lang.CharSequence)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html label)` Sets the second line label for this Action. | | `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/leanback/widget/Action#toString()()` | |

## Public constructors

### MultiAction

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

```
public MultiAction(int id)
```

Constructor

| Parameters |
|---|---|
| `int id` | The id of the Action. |

## Public methods

### getActionCount

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

```
public int getActionCount()
```

Returns the number of actions.

### getDrawable

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

```
public Drawable getDrawable(int index)
```

Returns the drawable at the given index.

### getIndex

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

```
public int getIndex()
```

Returns the current index.

### getLabel

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

```
public String getLabel(int index)
```

Returns the label at the given index.

### getSecondaryLabel

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

```
public String getSecondaryLabel(int index)
```

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)

```
public void nextIndex()
```

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)

```
public void setDrawables(Drawable[] drawables)
```

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)

```
public void setIndex(int index)
```

Sets the current index.

### setLabels

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

```
public void setLabels(String[] labels)
```

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)

```
public void setSecondaryLabels(String[] labels)
```

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