The Android Developer Challenge is back! Submit your idea before December 2.

PlaybackControlsRowPresenter

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

A PlaybackControlsRowPresenter 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.PlaybackFragment.

The detailed description is rendered using a Presenter passed in PlaybackControlsRowPresenter(Presenter). Typically this will be an instance of AbstractDetailsDescriptionPresenter. The application can access the detailed description ViewHolder from ViewHolder#mDescriptionViewHolder.

Summary

Nested classes

open

A ViewHolder for the PlaybackControlsRow.

Public constructors

<init>(descriptionPresenter: Presenter!)

Constructor for a PlaybackControlsRowPresenter.

Constructor for a PlaybackControlsRowPresenter.

Public methods

open Boolean

Returns true if secondary actions are hidden.

open Int

Returns the background color.

open OnActionClickedListener!

Returns the listener for Action click events.

open Int

Returns the primary color for the progress bar.

open Unit

open Unit

Sets the background color.

open Unit

Sets the listener for Action click events.

open Unit

Sets the primary color for the progress bar.

open Unit

Sets the secondary actions to be hidden behind a "more actions" button.

open Unit

Shows or hides space at the bottom of the playback controls row.

open Unit

Displays the primary actions.

Protected methods

open RowPresenter.ViewHolder!

open Unit

open Unit

open Unit

open Unit

open Unit

Public constructors

<init>

PlaybackControlsRowPresenter(descriptionPresenter: Presenter!)

Constructor for a PlaybackControlsRowPresenter.

Parameters
descriptionPresenter Presenter!: Presenter for displaying item details.

<init>

PlaybackControlsRowPresenter()

Constructor for a PlaybackControlsRowPresenter.

Public methods

areSecondaryActionsHidden

open fun areSecondaryActionsHidden(): Boolean

Returns true if secondary actions are hidden.

getBackgroundColor

open fun getBackgroundColor(): Int

Returns the background color. If no background color was set, transparent is returned.

getOnActionClickedListener

open fun getOnActionClickedListener(): OnActionClickedListener!

Returns the listener for Action click events.

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

setBackgroundColor

open fun setBackgroundColor(color: Int): Unit

Sets the background color. If not set, a default from the theme will be used.

setOnActionClickedListener

open fun setOnActionClickedListener(listener: OnActionClickedListener!): Unit

Sets the listener for Action click events.

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.

setSecondaryActionsHidden

open fun setSecondaryActionsHidden(hidden: Boolean): Unit

Sets the secondary actions to be hidden behind a "more actions" button. When "more actions" is selected, the primary actions are replaced with the secondary actions.

showBottomSpace

open fun showBottomSpace(vh: PlaybackControlsRowPresenter.ViewHolder!, show: Boolean): Unit

Shows or hides space at the bottom of the playback controls row. This allows the row to hug the bottom of the display when no other rows are present.

showPrimaryActions

open fun showPrimaryActions(vh: PlaybackControlsRowPresenter.ViewHolder!): Unit

Displays the primary actions. This will override the user having selected "more actions" to display the secondary actions; see setSecondaryActionsHidden(boolean).

Protected methods

createRowViewHolder

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

onBindRowViewHolder

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

onRowViewAttachedToWindow

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

onRowViewDetachedFromWindow

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

onRowViewSelected

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

onUnbindRowViewHolder

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