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 OnActionClickedListener!

Returns the listener for Action click events.

open Unit

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

open Unit

Sets the listener for Action click events.

open Boolean

Returns true if secondary actions are hidden.

open Unit

Sets the background color.

open Unit

Displays the primary actions.

open Int

Returns the background color.

open Unit

Sets the primary color for the progress bar.

open Int

Returns the primary color for the progress bar.

open Unit

open Unit

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

Protected methods
open Unit

open RowPresenter.ViewHolder!

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

getOnActionClickedListener

open fun getOnActionClickedListener(): OnActionClickedListener!

Returns the listener for Action click events.

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.

setOnActionClickedListener

open fun setOnActionClickedListener(listener: OnActionClickedListener!): Unit

Sets the listener for Action click events.

areSecondaryActionsHidden

open fun areSecondaryActionsHidden(): Boolean

Returns true if secondary actions are hidden.

setBackgroundColor

open fun setBackgroundColor(color: Int): Unit

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

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

getBackgroundColor

open fun getBackgroundColor(): Int

Returns the background color. If no background 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

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.

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

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