Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
Android 0.0.0 Developer Preview
belongs to Maven artifact androidx.leanback:leanback:1.1.0-alpha01

PlaybackTransportRowPresenter.ViewHolder

public class PlaybackTransportRowPresenter.ViewHolder
extends PlaybackRowPresenter.ViewHolder implements PlaybackSeekUi

java.lang.Object
   ↳ androidx.leanback.widget.Presenter.ViewHolder
     ↳ androidx.leanback.widget.RowPresenter.ViewHolder
       ↳ androidx.leanback.widget.PlaybackRowPresenter.ViewHolder
         ↳ androidx.leanback.widget.PlaybackTransportRowPresenter.ViewHolder


A ViewHolder for the PlaybackControlsRow supporting seek UI.

Summary

Inherited fields

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

Public constructors

PlaybackTransportRowPresenter.ViewHolder

public 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

public final 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

public final Presenter.ViewHolder getDescriptionViewHolder ()

Returns
Presenter.ViewHolder The ViewHolder for description.

getDurationView

public final 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

public void setPlaybackSeekUiClient (PlaybackSeekUi.Client client)

Interface to be implemented by UI widget to support PlaybackSeekUi.

Parameters
client PlaybackSeekUi.Client

Protected methods

onSetCurrentPositionLabel

protected 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

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