PlaybackTransportRowPresenter

open class PlaybackTransportRowPresenter : PlaybackRowPresenter
kotlin.Any
   ↳ androidx.leanback.widget.Presenter
   ↳ androidx.leanback.widget.RowPresenter
   ↳ androidx.leanback.widget.PlaybackRowPresenter
   ↳ androidx.leanback.widget.PlaybackTransportRowPresenter

A PlaybackTransportRowPresenter renders a PlaybackControlsRow to display a series of playback control buttons. Typically this row will be the first row in a fragment such as the androidx.leanback.app.PlaybackSupportFragment.

The detailed description is rendered using a Presenter passed in setDescriptionPresenter(Presenter). This can be an instance of AbstractDetailsDescriptionPresenter. The application can access the detailed description ViewHolder from ViewHolder#getDescriptionViewHolder().

Summary

Nested classes
open

A ViewHolder for the PlaybackControlsRow supporting seek UI.

Public constructors

Public methods
open OnActionClickedListener!

Returns the listener for Action click events.

open Unit
setDescriptionPresenter(descriptionPresenter: Presenter!)

open Unit

Set default seek increment if PlaybackSeekDataProvider is null.

open Unit

Sets the secondary color for the progress bar.

open Unit

Sets the listener for Action click events.

open Float

Get default seek increment if PlaybackSeekDataProvider is null.

open Int

Returns the secondary color for the progress bar.

open Unit

Sets the primary color for the progress bar.

open Int

Returns the primary color for the progress bar.

open Unit

Protected methods
open Unit

open RowPresenter.ViewHolder!

open Unit

open Unit

Client of progress bar is clicked, default implementation delegate click to PlayPauseAction.

open Unit

open Unit

open Unit

Public constructors

<init>

PlaybackTransportRowPresenter()

Public methods

getOnActionClickedListener

open fun getOnActionClickedListener(): OnActionClickedListener!

Returns the listener for Action click events.

setDescriptionPresenter

open fun setDescriptionPresenter(descriptionPresenter: Presenter!): Unit
Parameters
descriptionPresenter Presenter!: Presenter for displaying item details.

setDefaultSeekIncrement

open fun setDefaultSeekIncrement(ratio: Float): Unit

Set default seek increment if PlaybackSeekDataProvider is null.

Parameters
ratio Float: float value between 0(inclusive) and 1(inclusive).

setSecondaryProgressColor

open fun setSecondaryProgressColor(color: Int): Unit

Sets the secondary color for the progress bar. If not set, a default from the theme R.attr#playbackProgressSecondaryColor will be used.

Parameters
color Int: Color used to draw secondary progress.

setOnActionClickedListener

open fun setOnActionClickedListener(listener: OnActionClickedListener!): Unit

Sets the listener for Action click events.

getDefaultSeekIncrement

open fun getDefaultSeekIncrement(): Float

Get default seek increment if PlaybackSeekDataProvider is null.

Return
Float: float value between 0(inclusive) and 1(inclusive).

getSecondaryProgressColor

open fun getSecondaryProgressColor(): Int

Returns the secondary color for the progress bar. If no color was set, transparent is returned.

setProgressColor

open fun setProgressColor(color: Int): Unit

Sets the primary color for the progress bar. If not set, a default from the theme will be used.

getProgressColor

open fun getProgressColor(): Int

Returns the primary color for the progress bar. If no color was set, transparent is returned.

onReappear

open fun onReappear(rowViewHolder: RowPresenter.ViewHolder!): Unit

Protected methods

onRowViewDetachedFromWindow

protected open fun onRowViewDetachedFromWindow(vh: RowPresenter.ViewHolder!): Unit

createRowViewHolder

protected open fun createRowViewHolder(parent: ViewGroup!): RowPresenter.ViewHolder!

onUnbindRowViewHolder

protected open fun onUnbindRowViewHolder(holder: RowPresenter.ViewHolder!): Unit

onProgressBarClicked

protected open fun onProgressBarClicked(vh: PlaybackTransportRowPresenter.ViewHolder!): Unit

Client of progress bar is clicked, default implementation delegate click to PlayPauseAction.

Parameters
vh PlaybackTransportRowPresenter.ViewHolder!: ViewHolder of PlaybackTransportRowPresenter

onRowViewAttachedToWindow

protected open fun onRowViewAttachedToWindow(vh: RowPresenter.ViewHolder!): Unit

onBindRowViewHolder

protected open fun onBindRowViewHolder(holder: RowPresenter.ViewHolder!, item: Any!): Unit

onRowViewSelected

protected open fun onRowViewSelected(vh: RowPresenter.ViewHolder!, selected: Boolean): Unit