# PlaybackControlsRow

# PlaybackControlsRow

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

<br />

```
class PlaybackControlsRow : Row
```

<br />

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

*** ** * ** ***

A[Row](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Row)of playback controls to be displayed by a[PlaybackControlsRowPresenter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRowPresenter). This row consists of some optional item detail, a series of primary actions, and an optional series of secondary actions.

Controls are specified via an[ObjectAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ObjectAdapter)containing one or more[Action](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action)s.

Adapters should have their[PresenterSelector](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PresenterSelector)set to an instance of[ControlButtonPresenterSelector](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ControlButtonPresenterSelector).

## Summary

|                                                                                                                                                                                ### Nested types                                                                                                                                                                                 |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[PlaybackControlsRow.ClosedCaptioningAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.ClosedCaptioningAction)` : `[PlaybackControlsRow.MultiAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction) An action for displaying a CC (Closed Captioning) icon. |
| `class `[PlaybackControlsRow.FastForwardAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.FastForwardAction)` : `[PlaybackControlsRow.MultiAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction) An action displaying an icon for fast forward.                    |
| `class `[PlaybackControlsRow.HighQualityAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.HighQualityAction)` : `[PlaybackControlsRow.MultiAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction) An action for displaying a HQ (High Quality) icon.                |
| `class `[PlaybackControlsRow.MoreActions](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MoreActions)` : `[Action](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action) An action displaying an icon for "more actions".                                                                                |
| `abstract class `[PlaybackControlsRow.MultiAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction)` : `[Action](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action) Base class for an action comprised of a series of icons.                                                               |
| `class `[PlaybackControlsRow.OnPlaybackProgressCallback](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.OnPlaybackProgressCallback) Listener for progress or duration change.                                                                                                                                                      |
| `class `[PlaybackControlsRow.PictureInPictureAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.PictureInPictureAction)` : `[Action](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action) An action displaying an icon for picture-in-picture.                                                      |
| `class `[PlaybackControlsRow.PlayPauseAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.PlayPauseAction)` : `[PlaybackControlsRow.MultiAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction) An action displaying icons for play and pause.                        |
| `class `[PlaybackControlsRow.RepeatAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RepeatAction)` : `[PlaybackControlsRow.MultiAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction) An action for displaying three repeat states: none, one, or all.            |
| `class `[PlaybackControlsRow.RewindAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.RewindAction)` : `[PlaybackControlsRow.MultiAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction) An action displaying an icon for rewind.                                    |
| `class `[PlaybackControlsRow.ShuffleAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.ShuffleAction)` : `[PlaybackControlsRow.MultiAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction) An action for displaying a shuffle icon.                                  |
| `class `[PlaybackControlsRow.SkipNextAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.SkipNextAction)` : `[Action](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action) An action displaying an icon for skip next.                                                                               |
| `class `[PlaybackControlsRow.SkipPreviousAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.SkipPreviousAction)` : `[Action](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action) An action displaying an icon for skip previous.                                                                   |
| `abstract class `[PlaybackControlsRow.ThumbsAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.ThumbsAction)` : `[PlaybackControlsRow.MultiAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.MultiAction) A base class for displaying a thumbs action.                       |
| `class `[PlaybackControlsRow.ThumbsDownAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.ThumbsDownAction)` : `[PlaybackControlsRow.ThumbsAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.ThumbsAction) An action displaying an icon for thumbs down.                     |
| `class `[PlaybackControlsRow.ThumbsUpAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.ThumbsUpAction)` : `[PlaybackControlsRow.ThumbsAction](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.ThumbsAction) An action displaying an icon for thumbs up.                           |

|                                                                                                                                                        ### Public constructors                                                                                                                                                         |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [PlaybackControlsRow](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#PlaybackControlsRow())`()` Constructor for a PlaybackControlsRow that has no item details.                                                                                                                           |
| [PlaybackControlsRow](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#PlaybackControlsRow(java.lang.Object))`(item: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`!)` Constructor for a PlaybackControlsRow that displays some details from the given item. |

|                                           ### Public functions                                            |
|-----------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Action](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action)`!`               | [getActionForKeyCode](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getActionForKeyCode(int))`(keyCode: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Returns the Action associated with the given keycode, or null if no associated action exists.                                                                                                                                                                             |
| [Action](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Action)`!`               | [getActionForKeyCode](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getActionForKeyCode(androidx.leanback.widget.ObjectAdapter,int))`(adapter: `[ObjectAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ObjectAdapter)`!, keyCode: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Returns the Action associated with the given keycode, or null if no associated action exists.                  |
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                             | [getBufferedPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getBufferedPosition())`()` Returns the buffered progress of long type for the playback controls row.                                                                                                                                                                                                                                                                                          |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                               | ~~[getBufferedProgress](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getBufferedProgress())~~`()` **This function is deprecated.** Use[getBufferedPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getBufferedPosition()) <br />                                                                                                                                                                            |
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                             | ~~[getBufferedProgressLong](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getBufferedProgressLong())~~`()` **This function is deprecated.** Use[getBufferedPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getBufferedPosition()) <br />                                                                                                                                                                    |
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                             | [getCurrentPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getCurrentPosition())`()` Returns the current time in milliseconds of long type for playback controls row.                                                                                                                                                                                                                                                                                     |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                               | ~~[getCurrentTime](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getCurrentTime())~~`()` **This function is deprecated.** Use[getCurrentPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getCurrentPosition()) <br />                                                                                                                                                                                        |
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                             | ~~[getCurrentTimeLong](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getCurrentTimeLong())~~`()` **This function is deprecated.** Use[getCurrentPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getCurrentPosition()) <br />                                                                                                                                                                                |
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                             | [getDuration](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getDuration())`()` Returns duration in milliseconds.                                                                                                                                                                                                                                                                                                                                                  |
| [Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)`!`            | [getImageDrawable](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getImageDrawable())`()` Returns the image[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)of this row.                                                                                                                                                                                                                                                 |
| [Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`!`                            | [getItem](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getItem())`()` Returns the main item for the details page.                                                                                                                                                                                                                                                                                                                                                |
| [ObjectAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ObjectAdapter)`!` | [getPrimaryActionsAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getPrimaryActionsAdapter())`()` Returns the primary actions[ObjectAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ObjectAdapter).                                                                                                                                                                                                                       |
| [ObjectAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ObjectAdapter)`!` | [getSecondaryActionsAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getSecondaryActionsAdapter())`()` Returns the secondary actions[ObjectAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ObjectAdapter).                                                                                                                                                                                                                 |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                               | ~~[getTotalTime](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getTotalTime())~~`()` **This function is deprecated.** use[getDuration](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getDuration()) <br />                                                                                                                                                                                                          |
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                             | ~~[getTotalTimeLong](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getTotalTimeLong())~~`()` **This function is deprecated.** use[getDuration](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getDuration()) <br />                                                                                                                                                                                                  |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                             | [setBufferedPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setBufferedPosition(long))`(ms: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Sets the buffered progress for the playback controls row.                                                                                                                                                                                                                   |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                             | ~~[setBufferedProgress](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setBufferedProgress(int))~~`(ms: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` **This function is deprecated.** Use[setBufferedPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setBufferedPosition(long)) <br />                                                                                    |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                             | ~~[setBufferedProgressLong](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setBufferedProgressLong(long))~~`(ms: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` **This function is deprecated.** Use[setBufferedPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setBufferedPosition(long)) <br />                                                                         |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                             | [setCurrentPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setCurrentPosition(long))`(ms: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Sets the current time in milliseconds for the playback controls row.                                                                                                                                                                                                          |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                             | ~~[setCurrentTime](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setCurrentTime(int))~~`(ms: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` **This function is deprecated.** use[setCurrentPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setCurrentPosition(long)) <br />                                                                                                |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                             | ~~[setCurrentTimeLong](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setCurrentTimeLong(long))~~`(ms: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` **This function is deprecated.** use[setCurrentPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setCurrentPosition(long)) <br />                                                                                     |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                             | [setDuration](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setDuration(long))`(ms: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Sets the total time in milliseconds (long type) for the playback controls row.                                                                                                                                                                                                              |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                             | [setImageBitmap](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setImageBitmap(android.content.Context,android.graphics.Bitmap))`(context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!, bm: `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)`!)` Sets a[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)for this row.                                           |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                             | [setImageDrawable](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setImageDrawable(android.graphics.drawable.Drawable))`(drawable: `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)`!)` Sets a {link @Drawable} image for this row.                                                                                                                                                                                    |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                             | [setOnPlaybackProgressChangedListener](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setOnPlaybackProgressChangedListener(androidx.leanback.widget.PlaybackControlsRow.OnPlaybackProgressCallback))`(` ` listener: `[PlaybackControlsRow.OnPlaybackProgressCallback](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow.OnPlaybackProgressCallback)`!` `)` Sets a listener to be called when the playback state changes. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                             | [setPrimaryActionsAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setPrimaryActionsAdapter(androidx.leanback.widget.ObjectAdapter))`(adapter: `[ObjectAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ObjectAdapter)`!)` Sets the primary actions[ObjectAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ObjectAdapter).                                                                  |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                             | [setSecondaryActionsAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setSecondaryActionsAdapter(androidx.leanback.widget.ObjectAdapter))`(adapter: `[ObjectAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ObjectAdapter)`!)` Sets the secondary actions[ObjectAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ObjectAdapter).                                                            |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                             | ~~[setTotalTime](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setTotalTime(int))~~`(ms: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` **This function is deprecated.** Use[setDuration](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setDuration(long)) <br />                                                                                                                  |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                             | ~~[setTotalTimeLong](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setTotalTimeLong(long))~~`(ms: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` **This function is deprecated.** Use[setDuration](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setDuration(long)) <br />                                                                                                       |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[androidx.leanback.widget.Row](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Row) |-----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [HeaderItem](https://developer.android.com/reference/kotlin/androidx/leanback/widget/HeaderItem)`!` | [getHeaderItem](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Row#getHeaderItem())`()` Returns the[HeaderItem](https://developer.android.com/reference/kotlin/androidx/leanback/widget/HeaderItem)that represents metadata for the row.                                                                                                                                                | | [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)                       | [getId](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Row#getId())`()` Returns a unique identifier for this row.                                                                                                                                                                                                                                                                       | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                 | [isRenderedAsRowView](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Row#isRenderedAsRowView())`()` Returns true if this Row can be rendered in a visible row view, false otherwise.                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                       | [setHeaderItem](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Row#setHeaderItem(androidx.leanback.widget.HeaderItem))`(headerItem: `[HeaderItem](https://developer.android.com/reference/kotlin/androidx/leanback/widget/HeaderItem)`!)` Sets the[HeaderItem](https://developer.android.com/reference/kotlin/androidx/leanback/widget/HeaderItem)that represents metadata for the row. | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                       | [setId](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Row#setId(long))`(id: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`)` Sets the id for this row.                                                                                                                                                                                                | |

## Public constructors

### PlaybackControlsRow

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

```
PlaybackControlsRow()
```

Constructor for a PlaybackControlsRow that has no item details.  

### PlaybackControlsRow

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

```
PlaybackControlsRow(item: Any!)
```

Constructor for a PlaybackControlsRow that displays some details from the given item.  

|                                       Parameters                                       |
|----------------------------------------------------------------------------------------|----------------------------|
| `item: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`!` | The main item for the row. |

## Public functions

### getActionForKeyCode

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

```
fun getActionForKeyCode(keyCode: Int): Action!
```

Returns the Action associated with the given keycode, or null if no associated action exists. Searches the primary adapter first, then the secondary adapter.  

### getActionForKeyCode

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

```
fun getActionForKeyCode(adapter: ObjectAdapter!, keyCode: Int): Action!
```

Returns the Action associated with the given keycode, or null if no associated action exists.  

### getBufferedPosition

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

```
fun getBufferedPosition(): Long
```

Returns the buffered progress of long type for the playback controls row.  

### getBufferedProgress

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)  

```
fun [getBufferedProgress](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getBufferedProgress())(): Int
```
| **This function is deprecated.**   
|
| Use[getBufferedPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getBufferedPosition())

Returns the buffered progress for the playback controls row.  

|                                                   Throws                                                    |
|-------------------------------------------------------------------------------------------------------------|-----------------------------------------------------|
| [java.lang.ArithmeticException](https://developer.android.com/reference/java/lang/ArithmeticException.html) | If buffered progress in milliseconds overflows int. |

### getBufferedProgressLong

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)  

```
fun [getBufferedProgressLong](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getBufferedProgressLong())(): Long
```
| **This function is deprecated.**   
|
| Use[getBufferedPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getBufferedPosition())

Returns the buffered progress of long type for the playback controls row.  

### getCurrentPosition

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

```
fun getCurrentPosition(): Long
```

Returns the current time in milliseconds of long type for playback controls row.  

### getCurrentTime

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)  

```
fun [getCurrentTime](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getCurrentTime())(): Int
```
| **This function is deprecated.**   
|
| Use[getCurrentPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getCurrentPosition())

Returns the current time in milliseconds for the playback controls row.  

|                                                   Throws                                                    |
|-------------------------------------------------------------------------------------------------------------|------------------------------------------------|
| [java.lang.ArithmeticException](https://developer.android.com/reference/java/lang/ArithmeticException.html) | If current time in milliseconds overflows int. |

### getCurrentTimeLong

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)  

```
fun [getCurrentTimeLong](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getCurrentTimeLong())(): Long
```
| **This function is deprecated.**   
|
| Use[getCurrentPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getCurrentPosition())

Returns the current time in milliseconds of long type for playback controls row.  

### getDuration

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

```
fun getDuration(): Long
```

Returns duration in milliseconds.  

|                                    Returns                                    |
|-------------------------------------------------------------------------------|---------------------------|
| [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | Duration in milliseconds. |

### getImageDrawable

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

```
fun getImageDrawable(): Drawable!
```

Returns the image[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)of this row.  

|                                            Returns                                             |
|------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|
| [Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)`!` | The overview's image drawable, or null if no drawable has been assigned. |

### getItem

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

```
fun getItem(): Any!
```

Returns the main item for the details page.  

### getPrimaryActionsAdapter

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

```
fun getPrimaryActionsAdapter(): ObjectAdapter!
```

Returns the primary actions[ObjectAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ObjectAdapter).  

### getSecondaryActionsAdapter

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

```
fun getSecondaryActionsAdapter(): ObjectAdapter!
```

Returns the secondary actions[ObjectAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ObjectAdapter).  

### getTotalTime

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)  

```
fun [getTotalTime](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getTotalTime())(): Int
```
| **This function is deprecated.**   
|
| use[getDuration](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getDuration())

Returns the total time in milliseconds for the playback controls row.  

|                                                   Throws                                                    |
|-------------------------------------------------------------------------------------------------------------|----------------------------------------------|
| [java.lang.ArithmeticException](https://developer.android.com/reference/java/lang/ArithmeticException.html) | If total time in milliseconds overflows int. |

### getTotalTimeLong

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)  

```
fun [getTotalTimeLong](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getTotalTimeLong())(): Long
```
| **This function is deprecated.**   
|
| use[getDuration](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#getDuration())

Returns the total time in milliseconds of long type for the playback controls row.  

### setBufferedPosition

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

```
fun setBufferedPosition(ms: Long): Unit
```

Sets the buffered progress for the playback controls row.  

|                                     Parameters                                      |
|-------------------------------------------------------------------------------------|-------------------------------------------------|
| `ms: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | Buffered progress in milliseconds of long type. |

### setBufferedProgress

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)  

```
fun [setBufferedProgress](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setBufferedProgress(int))(ms: Int): Unit
```
| **This function is deprecated.**   
|
| Use[setBufferedPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setBufferedPosition(long))

Sets the buffered progress for the playback controls row. If this row is bound to a view, the view will automatically be updated to reflect the new value.  

### setBufferedProgressLong

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)  

```
fun [setBufferedProgressLong](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setBufferedProgressLong(long))(ms: Long): Unit
```
| **This function is deprecated.**   
|
| Use[setBufferedPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setBufferedPosition(long))

Sets the buffered progress for the playback controls row.  

|                                     Parameters                                      |
|-------------------------------------------------------------------------------------|-------------------------------------------------|
| `ms: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | Buffered progress in milliseconds of long type. |

### setCurrentPosition

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

```
fun setCurrentPosition(ms: Long): Unit
```

Sets the current time in milliseconds for the playback controls row. If this row is bound to a view, the view will automatically be updated to reflect the new value.  

|                                     Parameters                                      |
|-------------------------------------------------------------------------------------|--------------------------------------------|
| `ms: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | Current time in milliseconds of long type. |

### setCurrentTime

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)  

```
fun [setCurrentTime](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setCurrentTime(int))(ms: Int): Unit
```
| **This function is deprecated.**   
|
| use[setCurrentPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setCurrentPosition(long))

Sets the current time in milliseconds for the playback controls row. If this row is bound to a view, the view will automatically be updated to reflect the new value.  

### setCurrentTimeLong

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)  

```
fun [setCurrentTimeLong](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setCurrentTimeLong(long))(ms: Long): Unit
```
| **This function is deprecated.**   
|
| use[setCurrentPosition](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setCurrentPosition(long))

Sets the current time in milliseconds for playback controls row in long type.  

|                                     Parameters                                      |
|-------------------------------------------------------------------------------------|--------------------------------------------|
| `ms: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | Current time in milliseconds of long type. |

### setDuration

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

```
fun setDuration(ms: Long): Unit
```

Sets the total time in milliseconds (long type) for the playback controls row. If this row is bound to a view, the view will automatically be updated to reflect the new value.  

|                                     Parameters                                      |
|-------------------------------------------------------------------------------------|------------------------------------------|
| `ms: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | Total time in milliseconds of long type. |

### setImageBitmap

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

```
fun setImageBitmap(context: Context!, bm: Bitmap!): Unit
```

Sets a[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)for this row.

If set after the row has been bound to a view, the adapter must be notified that this row has changed.  

|                                          Parameters                                           |
|-----------------------------------------------------------------------------------------------|-----------------------------------------------|
| `context: `[Context](https://developer.android.com/reference/android/content/Context.html)`!` | The context to retrieve display metrics from. |
| `bm: `[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)`!`       | The bitmap to set.                            |

### setImageDrawable

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

```
fun setImageDrawable(drawable: Drawable!): Unit
```

Sets a {link @Drawable} image for this row.

If set after the row has been bound to a view, the adapter must be notified that this row has changed.  

|                                                 Parameters                                                 |
|------------------------------------------------------------------------------------------------------------|----------------------|
| `drawable: `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)`!` | The drawable to set. |

### setOnPlaybackProgressChangedListener

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

```
fun setOnPlaybackProgressChangedListener(
    listener: PlaybackControlsRow.OnPlaybackProgressCallback!
): Unit
```

Sets a listener to be called when the playback state changes.  

### setPrimaryActionsAdapter

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

```
fun setPrimaryActionsAdapter(adapter: ObjectAdapter!): Unit
```

Sets the primary actions[ObjectAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ObjectAdapter).

If set after the row has been bound to a view, the adapter must be notified that this row has changed.  

### setSecondaryActionsAdapter

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

```
fun setSecondaryActionsAdapter(adapter: ObjectAdapter!): Unit
```

Sets the secondary actions[ObjectAdapter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ObjectAdapter).

If set after the row has been bound to a view, the adapter must be notified that this row has changed.  

### setTotalTime

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)  

```
fun [setTotalTime](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setTotalTime(int))(ms: Int): Unit
```
| **This function is deprecated.**   
|
| Use[setDuration](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setDuration(long))

Sets the total time in milliseconds for the playback controls row.

If set after the row has been bound to a view, the adapter must be notified that this row has changed.  

### setTotalTimeLong

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)  

```
fun [setTotalTimeLong](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setTotalTimeLong(long))(ms: Long): Unit
```
| **This function is deprecated.**   
|
| Use[setDuration](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackControlsRow#setDuration(long))

Sets the total time in milliseconds (long type) for the playback controls row.  

|                                     Parameters                                      |
|-------------------------------------------------------------------------------------|------------------------------------------|
| `ms: `[Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) | Total time in milliseconds of long type. |