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

*** ** * ** ***


```
public class PlaybackControlsRow extends Row
```

<br />

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

*** ** * ** ***

A `https://developer.android.com/reference/androidx/leanback/widget/Row` of playback controls to be displayed by a `https://developer.android.com/reference/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 `https://developer.android.com/reference/androidx/leanback/widget/ObjectAdapter` containing one or more `https://developer.android.com/reference/androidx/leanback/widget/Action`s.

Adapters should have their `https://developer.android.com/reference/androidx/leanback/widget/PresenterSelector` set to an instance of `https://developer.android.com/reference/androidx/leanback/widget/ControlButtonPresenterSelector`.

## Summary

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

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#PlaybackControlsRow()()` Constructor for a PlaybackControlsRow that has no item details. |
| `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#PlaybackControlsRow(java.lang.Object)(https://developer.android.com/reference/java/lang/Object.html item)` Constructor for a PlaybackControlsRow that displays some details from the given item. |

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

| ### Inherited methods |
|---|
| From [androidx.leanback.widget.Row](https://developer.android.com/reference/androidx/leanback/widget/Row) |---|---| | `final https://developer.android.com/reference/androidx/leanback/widget/HeaderItem` | `https://developer.android.com/reference/androidx/leanback/widget/Row#getHeaderItem()()` Returns the `https://developer.android.com/reference/androidx/leanback/widget/HeaderItem` that represents metadata for the row. | | `final long` | `https://developer.android.com/reference/androidx/leanback/widget/Row#getId()()` Returns a unique identifier for this row. | | `boolean` | `https://developer.android.com/reference/androidx/leanback/widget/Row#isRenderedAsRowView()()` Returns true if this Row can be rendered in a visible row view, false otherwise. | | `final void` | `https://developer.android.com/reference/androidx/leanback/widget/Row#setHeaderItem(androidx.leanback.widget.HeaderItem)(https://developer.android.com/reference/androidx/leanback/widget/HeaderItem headerItem)` Sets the `https://developer.android.com/reference/androidx/leanback/widget/HeaderItem` that represents metadata for the row. | | `final void` | `https://developer.android.com/reference/androidx/leanback/widget/Row#setId(long)(long id)` 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)

```
public 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)

```
public PlaybackControlsRow(Object item)
```

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

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/Object.html item` | The main item for the row. |

## Public methods

### getActionForKeyCode

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

```
public Action getActionForKeyCode(int keyCode)
```

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)

```
public Action getActionForKeyCode(ObjectAdapter adapter, int keyCode)
```

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)

```
public long getBufferedPosition()
```

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)

```
public int [getBufferedProgress](https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#getBufferedProgress())()
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#getBufferedPosition()`

Returns the buffered progress for the playback controls row.

| Throws |
|---|---|
| `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)

```
public long [getBufferedProgressLong](https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#getBufferedProgressLong())()
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/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)

```
public long getCurrentPosition()
```

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)

```
public int [getCurrentTime](https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#getCurrentTime())()
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#getCurrentPosition()`

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

| Throws |
|---|---|
| `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)

```
public long [getCurrentTimeLong](https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#getCurrentTimeLong())()
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/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)

```
public long getDuration()
```

Returns duration in milliseconds.

| Returns |
|---|---|
| `long` | Duration in milliseconds. |

### getImageDrawable

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

```
public final Drawable getImageDrawable()
```

Returns the image `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` of this row.

| Returns |
|---|---|
| `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)

```
public final Object getItem()
```

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)

```
public final ObjectAdapter getPrimaryActionsAdapter()
```

Returns the primary actions `https://developer.android.com/reference/androidx/leanback/widget/ObjectAdapter`.

### getSecondaryActionsAdapter

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

```
public final ObjectAdapter getSecondaryActionsAdapter()
```

Returns the secondary actions `https://developer.android.com/reference/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)

```
public int [getTotalTime](https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#getTotalTime())()
```

> [!CAUTION]
> **This method is deprecated.**   
>
> use `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#getDuration()`

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

| Throws |
|---|---|
| `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)

```
public long [getTotalTimeLong](https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#getTotalTimeLong())()
```

> [!CAUTION]
> **This method is deprecated.**   
>
> use `https://developer.android.com/reference/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)

```
public void setBufferedPosition(long ms)
```

Sets the buffered progress for the playback controls row.

| Parameters |
|---|---|
| `long ms` | 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)

```
public void [setBufferedProgress](https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#setBufferedProgress(int))(int ms)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/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)

```
public void [setBufferedProgressLong](https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#setBufferedProgressLong(long))(long ms)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#setBufferedPosition(long)`

Sets the buffered progress for the playback controls row.

| Parameters |
|---|---|
| `long ms` | Buffered progress in milliseconds of long type. |

### setCurrentPosition

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

```
public void setCurrentPosition(long ms)
```

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 |
|---|---|
| `long ms` | 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)

```
public void [setCurrentTime](https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#setCurrentTime(int))(int ms)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> use `https://developer.android.com/reference/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)

```
public void [setCurrentTimeLong](https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#setCurrentTimeLong(long))(long ms)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> use `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#setCurrentPosition(long)`

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

| Parameters |
|---|---|
| `long ms` | Current time in milliseconds of long type. |

### setDuration

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

```
public void setDuration(long ms)
```

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 |
|---|---|
| `long ms` | Total time in milliseconds of long type. |

### setImageBitmap

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

```
public final void setImageBitmap(Context context, Bitmap bm)
```

Sets a `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 |
|---|---|
| `https://developer.android.com/reference/android/content/Context.html context` | The context to retrieve display metrics from. |
| `https://developer.android.com/reference/android/graphics/Bitmap.html bm` | The bitmap to set. |

### setImageDrawable

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

```
public final void setImageDrawable(Drawable drawable)
```

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 |
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable` | The drawable to set. |

### setOnPlaybackProgressChangedListener

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

```
public void setOnPlaybackProgressChangedListener(
    PlaybackControlsRow.OnPlaybackProgressCallback listener
)
```

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)

```
public final void setPrimaryActionsAdapter(ObjectAdapter adapter)
```

Sets the primary actions `https://developer.android.com/reference/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)

```
public final void setSecondaryActionsAdapter(ObjectAdapter adapter)
```

Sets the secondary actions `https://developer.android.com/reference/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)

```
public void [setTotalTime](https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#setTotalTime(int))(int ms)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/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)

```
public void [setTotalTimeLong](https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#setTotalTimeLong(long))(long ms)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/leanback/widget/PlaybackControlsRow#setDuration(long)`

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

| Parameters |
|---|---|
| `long ms` | Total time in milliseconds of long type. |