Android APIs
public class

PlaybackControlsRowPresenter

extends RowPresenter
java.lang.Object
   ↳ android.support.v17.leanback.widget.Presenter
     ↳ android.support.v17.leanback.widget.RowPresenter
       ↳ android.support.v17.leanback.widget.PlaybackControlsRowPresenter

Class Overview

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

Summary

Nested Classes
class PlaybackControlsRowPresenter.ViewHolder A ViewHolder for the PlaybackControlsRow. 
[Expand]
Inherited Constants
From class android.support.v17.leanback.widget.RowPresenter
Public Constructors
PlaybackControlsRowPresenter(Presenter descriptionPresenter)
Constructor for a PlaybackControlsRowPresenter.
PlaybackControlsRowPresenter()
Constructor for a PlaybackControlsRowPresenter.
Public Methods
boolean areSecondaryActionsHidden()
Returns true if secondary actions are hidden.
int getBackgroundColor()
Returns the background color.
OnActionClickedListener getOnActionClickedListener()
Gets the listener for Action click events.
int getProgressColor()
Returns the primary color for the progress bar.
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)
Display 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)
void onRowViewAttachedToWindow(RowPresenter.ViewHolder vh)
void onRowViewDetachedFromWindow(RowPresenter.ViewHolder vh)
void onRowViewSelected(RowPresenter.ViewHolder vh, boolean selected)
Subclass may override this to respond to selected state changes of a Row.
void onUnbindRowViewHolder(RowPresenter.ViewHolder holder)
[Expand]
Inherited Methods
From class android.support.v17.leanback.widget.RowPresenter
From class android.support.v17.leanback.widget.Presenter
From class java.lang.Object

Public Constructors

public PlaybackControlsRowPresenter (Presenter descriptionPresenter)

Constructor for a PlaybackControlsRowPresenter.

Parameters
descriptionPresenter Presenter for displaying item details.

public PlaybackControlsRowPresenter ()

Constructor for a PlaybackControlsRowPresenter.

Public Methods

public boolean areSecondaryActionsHidden ()

Returns true if secondary actions are hidden.

public int getBackgroundColor ()

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

public OnActionClickedListener getOnActionClickedListener ()

Gets the listener for Action click events.

public int getProgressColor ()

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

public void setBackgroundColor (int color)

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

public void setOnActionClickedListener (OnActionClickedListener listener)

Sets the listener for Action click events.

public void setProgressColor (int color)

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

public void setSecondaryActionsHidden (boolean hidden)

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.

public void showBottomSpace (PlaybackControlsRowPresenter.ViewHolder vh, boolean show)

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.

public void showPrimaryActions (PlaybackControlsRowPresenter.ViewHolder vh)

Display the primary actions.

Protected Methods

protected RowPresenter.ViewHolder createRowViewHolder (ViewGroup parent)

Called to create a ViewHolder object for a Row. Subclasses will override this method to return a different concrete ViewHolder object.

Parameters
parent The parent View for the Row's view holder.
Returns
  • A ViewHolder for the Row's View.

protected void onBindRowViewHolder (RowPresenter.ViewHolder holder, Object item)

protected void onRowViewAttachedToWindow (RowPresenter.ViewHolder vh)

protected void onRowViewDetachedFromWindow (RowPresenter.ViewHolder vh)

protected void onRowViewSelected (RowPresenter.ViewHolder vh, boolean selected)

Subclass may override this to respond to selected state changes of a Row. Subclass may make visual changes to Row view but must not create animation on the Row view.

protected void onUnbindRowViewHolder (RowPresenter.ViewHolder holder)