added in version 26.1.0
belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1

PlaybackTransportRowPresenter

public class PlaybackTransportRowPresenter
extends PlaybackRowPresenter

java.lang.Object
   ↳ android.support.v17.leanback.widget.Presenter
     ↳ android.support.v17.leanback.widget.RowPresenter
       ↳ android.support.v17.leanback.widget.PlaybackRowPresenter
         ↳ android.support.v17.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 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 getDescriptionViewHolder().

Summary

Nested classes

class PlaybackTransportRowPresenter.ViewHolder

A ViewHolder for the PlaybackControlsRow supporting seek UI. 

Inherited constants

From class android.support.v17.leanback.widget.RowPresenter

Public constructors

PlaybackTransportRowPresenter()

Public methods

float getDefaultSeekIncrement()

Get default seek increment if PlaybackSeekDataProvider is null.

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 setDefaultSeekIncrement(float ratio)

Set default seek increment if PlaybackSeekDataProvider is null.

void setDescriptionPresenter(Presenter descriptionPresenter)
void setOnActionClickedListener(OnActionClickedListener listener)

Sets the listener for Action click events.

void setProgressColor(int color)

Sets the primary color for the progress bar.

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 onProgressBarClicked(PlaybackTransportRowPresenter.ViewHolder vh)

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

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

From class android.support.v17.leanback.widget.PlaybackRowPresenter
From class android.support.v17.leanback.widget.RowPresenter
From class android.support.v17.leanback.widget.Presenter
From class java.lang.Object
From interface android.support.v17.leanback.widget.FacetProvider

Public constructors

PlaybackTransportRowPresenter

added in version 26.1.0
PlaybackTransportRowPresenter ()

Public methods

getDefaultSeekIncrement

added in version 26.1.0
float getDefaultSeekIncrement ()

Get default seek increment if PlaybackSeekDataProvider is null.

Returns
float float value between 0(inclusive) and 1(inclusive).

getOnActionClickedListener

added in version 26.1.0
OnActionClickedListener getOnActionClickedListener ()

Returns the listener for Action click events.

Returns
OnActionClickedListener

getProgressColor

added in version 26.1.0
int getProgressColor ()

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

Returns
int

onReappear

added in version 26.1.0
void onReappear (RowPresenter.ViewHolder rowViewHolder)

Provides hook to update the UI when the view reappears.

Parameters
rowViewHolder RowPresenter.ViewHolder

setDefaultSeekIncrement

added in version 26.1.0
void setDefaultSeekIncrement (float ratio)

Set default seek increment if PlaybackSeekDataProvider is null.

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

setDescriptionPresenter

added in version 26.1.0
void setDescriptionPresenter (Presenter descriptionPresenter)

Parameters
descriptionPresenter Presenter: Presenter for displaying item details.

setOnActionClickedListener

added in version 26.1.0
void setOnActionClickedListener (OnActionClickedListener listener)

Sets the listener for Action click events.

Parameters
listener OnActionClickedListener

setProgressColor

added in version 26.1.0
void setProgressColor (int color)

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

Parameters
color int

Protected methods

createRowViewHolder

added in version 26.1.0
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 ViewGroup: The parent View for the Row's view holder.

Returns
RowPresenter.ViewHolder A ViewHolder for the Row's View.

onBindRowViewHolder

added in version 26.1.0
void onBindRowViewHolder (RowPresenter.ViewHolder holder, 
                Object item)

Binds the given row object to the given ViewHolder. Derived classes of RowPresenter overriding onBindRowViewHolder(ViewHolder, Object) must call through the super class's implementation of this method.

Parameters
holder RowPresenter.ViewHolder

item Object

onProgressBarClicked

added in version 26.1.0
void onProgressBarClicked (PlaybackTransportRowPresenter.ViewHolder vh)

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

Parameters
vh PlaybackTransportRowPresenter.ViewHolder: ViewHolder of PlaybackTransportRowPresenter

onRowViewAttachedToWindow

added in version 26.1.0
void onRowViewAttachedToWindow (RowPresenter.ViewHolder vh)

Invoked when the row view is attached to the window.

Parameters
vh RowPresenter.ViewHolder

onRowViewDetachedFromWindow

added in version 26.1.0
void onRowViewDetachedFromWindow (RowPresenter.ViewHolder vh)

Invoked when the row view is detached from the window.

Parameters
vh RowPresenter.ViewHolder

onRowViewSelected

added in version 26.1.0
void onRowViewSelected (RowPresenter.ViewHolder vh, 
                boolean selected)

Called when the given row view changes selection state. A subclass may override this to respond to selected state changes of a Row. A subclass may make visual changes to Row view but must not create animation on the Row view.

Parameters
vh RowPresenter.ViewHolder

selected boolean

onUnbindRowViewHolder

added in version 26.1.0
void onUnbindRowViewHolder (RowPresenter.ViewHolder holder)

Unbinds the given ViewHolder. Derived classes of RowPresenter overriding onUnbindRowViewHolder(ViewHolder) must call through the super class's implementation of this method.

Parameters
holder RowPresenter.ViewHolder