added in version 1.0.0
belongs to Maven artifact androidx.leanback:leanback:1.0.0-beta01

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

added in version 1.0.0
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

added in version 1.0.0
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

added in version 1.0.0
public final Presenter.ViewHolder getDescriptionViewHolder ()

Returns
Presenter.ViewHolder The ViewHolder for description.

getDurationView

added in version 1.0.0
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

added in version 1.0.0
public 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 1.0.0
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

added in version 1.0.0
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.