PlaybackTransportRowPresenter.ViewHolder


public inner class PlaybackTransportRowPresenter.ViewHolder extends PlaybackRowPresenter.ViewHolder implements PlaybackSeekUi


A ViewHolder for the PlaybackControlsRow supporting seek UI.

Summary

Public constructors

ViewHolder(View rootView, Presenter descriptionPresenter)

Constructor of ViewHolder of PlaybackTransportRowPresenter

Public methods

final TextView

Returns the TextView that showing current position label.

final Presenter.ViewHolder
final TextView

Returns the TextView that showing total time label.

void

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 androidx.leanback.widget.FacetProvider
abstract @Nullable Object
getFacet(@NonNull Class<Object> facetClass)

Queries optional implemented facet.

From androidx.leanback.widget.Presenter.ViewHolder
final Object
getFacet(Class<Object> facetClass)

Queries optional implemented facet.

final void
setFacet(Class<Object> facetClass, Object facetImpl)

Sets dynamic implemented facet in addition to basic ViewHolder functions.

From androidx.leanback.widget.RowPresenter.ViewHolder
final RowHeaderPresenter.ViewHolder

Returns the view holder for the Row header for this Row.

final BaseOnItemViewClickedListener

Returns the listener for item click event.

final BaseOnItemViewSelectedListener

Returns the listener for item or row selection.

View.OnKeyListener

Returns the key listener.

final Row

Returns the row bound to this ViewHolder.

final Object

Returns the Row object bound to this ViewHolder.

final float

Returns the current selection level of the Row.

@Nullable Object

Return currently selected item inside a row ViewHolder.

@Nullable Presenter.ViewHolder

Return ViewHolder of currently selected item inside a row ViewHolder.

final boolean

Returns whether the Row is in its expanded state.

final boolean

Returns whether the Row is selected.

final void
setActivated(boolean activated)

Sets the row view's activated status.

final void

Sets the listener for item click event.

final void

Sets the listener for item or row selection.

void

Sets a key listener.

final void

Synchronizes the activated status of view to the last value passed through setActivated.

Public constructors

ViewHolder

Added in 1.1.0
public ViewHolder(View rootView, Presenter descriptionPresenter)

Constructor of ViewHolder of PlaybackTransportRowPresenter

Parameters
View rootView

Root view of the ViewHolder.

Presenter descriptionPresenter

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

Public methods

getCurrentPositionView

Added in 1.1.0
public final TextView getCurrentPositionView()

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

Returns
TextView

The TextView that showing current position label.

getDescriptionViewHolder

Added in 1.1.0
public final Presenter.ViewHolder getDescriptionViewHolder()
Returns
Presenter.ViewHolder

The ViewHolder for description.

getDurationView

Added in 1.1.0
public final TextView getDurationView()

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

Returns
TextView

The TextView that showing total time label.

setPlaybackSeekUiClient

Added in 1.2.0-alpha04
public void setPlaybackSeekUiClient(PlaybackSeekUi.Client client)

Interface to be implemented by UI widget to support PlaybackSeekUi.

Protected methods

onSetCurrentPositionLabel

Added in 1.1.0
protected void onSetCurrentPositionLabel(long currentTimeMs)

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

Parameters
long currentTimeMs

Current playback position in milliseconds.

onSetDurationLabel

Added in 1.1.0
protected void onSetDurationLabel(long totalTimeMs)

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

Parameters
long totalTimeMs

Total duration of the media in milliseconds.