# PlaybackControlsRow.RepeatAction

# PlaybackControlsRow.RepeatAction

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.RepeatAction)  
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.RepeatAction "View this page in Java")

<br />

```
class PlaybackControlsRow.RepeatAction : PlaybackControlsRow.MultiAction
```

<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)      ||
|   |   | ↳ | [androidx.leanback.widget.PlaybackControlsRow.RepeatAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RepeatAction) |

*** ** * ** ***

An action for displaying three repeat states: none, one, or all.

## Summary

|                                    ### Constants                                    |
|-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [ALL](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RepeatAction#ALL())` = 1` **This property is deprecated.** Use[INDEX_ALL](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RepeatAction#INDEX_ALL()) <br />     |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [INDEX_ALL](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RepeatAction#INDEX_ALL())` = 1` Action index for the repeat-all icon.                                                                                                                                |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [INDEX_NONE](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RepeatAction#INDEX_NONE())` = 0` Action index for the repeat-none icon.                                                                                                                             |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [INDEX_ONE](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RepeatAction#INDEX_ONE())` = 2` Action index for the repeat-one icon.                                                                                                                                |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [NONE](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RepeatAction#NONE())` = 0` **This property is deprecated.** Use[INDEX_NONE](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RepeatAction#INDEX_NONE()) <br /> |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [ONE](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RepeatAction#ONE())` = 2` **This property is deprecated.** Use[INDEX_ONE](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RepeatAction#INDEX_ONE()) <br />     |

|                                                                                                                                                                                                                             ### Public constructors                                                                                                                                                                                                                             |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [RepeatAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RepeatAction#RepeatAction(android.content.Context))`(context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!)` Constructor                                                                                                                                                                                                       |
| [RepeatAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RepeatAction#RepeatAction(android.content.Context,int))`(context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!, highlightColor: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Constructor                                                                                                    |
| [RepeatAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RepeatAction#RepeatAction(android.content.Context,int,int))`(context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!, repeatAllColor: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, repeatOneColor: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Constructor |

|                                                                                                                                                                                                                                                                                          ### 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())`()`                                                                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| From[androidx.leanback.widget.PlaybackControlsRow.MultiAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction) |------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [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. | |

## Constants

### ALL

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

```
const val ALL = 1: Int
```
| **This property is deprecated.**   
|
| Use[INDEX_ALL](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RepeatAction#INDEX_ALL())

Action index for the repeat-all icon.  

### INDEX_ALL

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

```
const val INDEX_ALL = 1: Int
```

Action index for the repeat-all icon.  

### INDEX_NONE

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

```
const val INDEX_NONE = 0: Int
```

Action index for the repeat-none icon.  

### INDEX_ONE

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

```
const val INDEX_ONE = 2: Int
```

Action index for the repeat-one icon.  

### NONE

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

```
const val NONE = 0: Int
```
| **This property is deprecated.**   
|
| Use[INDEX_NONE](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RepeatAction#INDEX_NONE())

Action index for the repeat-none icon.  

### ONE

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

```
const val ONE = 2: Int
```
| **This property is deprecated.**   
|
| Use[INDEX_ONE](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RepeatAction#INDEX_ONE())

Action index for the repeat-one icon.  

## Public constructors

### RepeatAction

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

```
RepeatAction(context: Context!)
```

Constructor  

|                                          Parameters                                           |
|-----------------------------------------------------------------------------------------------|-------------------------------------|
| `context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!` | Context used for loading resources. |

### RepeatAction

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

```
RepeatAction(context: Context!, highlightColor: Int)
```

Constructor  

|                                          Parameters                                           |
|-----------------------------------------------------------------------------------------------|-------------------------------------------------------|
| `context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!` | Context used for loading resources                    |
| `highlightColor: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | Color to display the repeat-all and repeat0one icons. |

### RepeatAction

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

```
RepeatAction(context: Context!, repeatAllColor: Int, repeatOneColor: Int)
```

Constructor  

|                                          Parameters                                           |
|-----------------------------------------------------------------------------------------------|---------------------------------------|
| `context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!` | Context used for loading resources    |
| `repeatAllColor: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | Color to display the repeat-all icon. |
| `repeatOneColor: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | Color to display the repeat-one icon. |