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

PlaybackTransportRowPresenter.ViewHolder

public class PlaybackTransportRowPresenter.ViewHolder
extends PlaybackRowPresenter.ViewHolder implements PlaybackSeekUi

java.lang.Object
   ↳ android.support.v17.leanback.widget.Presenter.ViewHolder
     ↳ android.support.v17.leanback.widget.RowPresenter.ViewHolder
       ↳ android.support.v17.leanback.widget.PlaybackRowPresenter.ViewHolder
         ↳ android.support.v17.leanback.widget.PlaybackTransportRowPresenter.ViewHolder


A ViewHolder for the PlaybackControlsRow supporting seek UI.

Summary

Inherited fields

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

Public constructors

PlaybackTransportRowPresenter.ViewHolder(View rootView, Presenter descriptionPresenter)

Constructor of ViewHolder of PlaybackTransportRowPresenter

Public methods

final TextView getCurrentPositionView()

Returns the TextView that showing current position label.

final Presenter.ViewHolder getDescriptionViewHolder()
final TextView getDurationView()

Returns the TextView that showing total time label.

void setPlaybackSeekUiClient(PlaybackSeekUi.Client client)

Interface to be implemented by UI widget to support PlaybackSeekUi.

Protected methods

void onSetCurrentPositionLabel(long currentTimeMs)

Called to update current time label.

void onSetDurationLabel(long totalTimeMs)

Called to update total time label.

Inherited methods

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

Public constructors

PlaybackTransportRowPresenter.ViewHolder

added in version 26.1.0
PlaybackTransportRowPresenter.ViewHolder (View rootView, 
                Presenter descriptionPresenter)

Constructor of ViewHolder of PlaybackTransportRowPresenter

Parameters
rootView View: Root view of the ViewHolder.

descriptionPresenter Presenter: The presenter that will be used to create description ViewHolder. The description view will be added into tree.

Public methods

getCurrentPositionView

added in version 26.1.0
TextView getCurrentPositionView ()

Returns the TextView that showing current position label. This method might be used in onSetCurrentPositionLabel(long).

Returns
TextView The TextView that showing current position label.

getDescriptionViewHolder

added in version 26.1.0
Presenter.ViewHolder getDescriptionViewHolder ()

Returns
Presenter.ViewHolder The ViewHolder for description.

getDurationView

added in version 26.1.0
TextView getDurationView ()

Returns the TextView that showing total time label. This method might be used in onSetDurationLabel(long).

Returns
TextView The TextView that showing total time label.

setPlaybackSeekUiClient

added in version 26.1.0
void setPlaybackSeekUiClient (PlaybackSeekUi.Client client)

Interface to be implemented by UI widget to support PlaybackSeekUi.

Parameters
client PlaybackSeekUi.Client

Protected methods

onSetCurrentPositionLabel

added in version 26.1.0
void onSetCurrentPositionLabel (long currentTimeMs)

Called to update current time label. Default implementation updates the TextView getCurrentPositionView(). Subclass might override.

Parameters
currentTimeMs long: Current playback position in milliseconds.

onSetDurationLabel

added in version 26.1.0
void onSetDurationLabel (long totalTimeMs)

Called to update total time label. Default implementation updates the TextView getDurationView(). Subclass might override.

Parameters
totalTimeMs long: Total duration of the media in milliseconds.