public class PlaybackControlsRowPresenter
extends PlaybackRowPresenter

   ↳ 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 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 PlaybackControlsRowPresenter.ViewHolder.mDescriptionViewHolder.


Nested classes

class PlaybackControlsRowPresenter.ViewHolder

A ViewHolder for the PlaybackControlsRow. 

Inherited constants

Public constructors

PlaybackControlsRowPresenter(Presenter descriptionPresenter)

Constructor for a PlaybackControlsRowPresenter.


Constructor for a PlaybackControlsRowPresenter.

Public methods

boolean areSecondaryActionsHidden()

Returns true if secondary actions are hidden.

int getBackgroundColor()

Returns the background color.

OnActionClickedListener getOnActionClickedListener()

Returns the listener for Action click events.

int getProgressColor()

Returns the primary color for the progress bar.

void onReappear(RowPresenter.ViewHolder rowViewHolder)

Provides hook to update the UI when the view reappears.

void setBackgroundColor(int color)

Sets the background color.

void setOnActionClickedListener(OnActionClickedListener listener)

Sets the listener for Action click events.

void setProgressColor(int color)

Sets the primary color for the progress bar.

void setSecondaryActionsHidden(boolean hidden)

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

void showBottomSpace(PlaybackControlsRowPresenter.ViewHolder vh, boolean show)

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

void showPrimaryActions(PlaybackControlsRowPresenter.ViewHolder vh)

Displays the primary actions.

Protected methods

RowPresenter.ViewHolder createRowViewHolder(ViewGroup parent)

Called to create a ViewHolder object for a Row.

void onBindRowViewHolder(RowPresenter.ViewHolder holder, Object item)

Binds the given row object to the given ViewHolder.

void onRowViewAttachedToWindow(RowPresenter.ViewHolder vh)

Invoked when the row view is attached to the window.

void onRowViewDetachedFromWindow(RowPresenter.ViewHolder vh)

Invoked when the row view is detached from the window.

void onRowViewSelected(RowPresenter.ViewHolder vh, boolean selected)

Called when the given row view changes selection state.

void onUnbindRowViewHolder(RowPresenter.ViewHolder holder)

Unbinds the given ViewHolder.

Inherited methods