PlaybackTransportRowPresenter.ViewHolder

class PlaybackTransportRowPresenter.ViewHolder : PlaybackRowPresenter.ViewHolder, PlaybackSeekUi


A ViewHolder for the PlaybackControlsRow supporting seek UI.

Summary

Public constructors

ViewHolder(rootView: View!, descriptionPresenter: Presenter!)

Constructor of ViewHolder of PlaybackTransportRowPresenter

Public functions

TextView!

Returns the TextView that showing current position label.

Presenter.ViewHolder!
TextView!

Returns the TextView that showing total time label.

Unit

Interface to be implemented by UI widget to support PlaybackSeekUi.

Protected functions

Unit

Called to update current time label.

Unit
onSetDurationLabel(totalTimeMs: Long)

Called to update total time label.

Inherited functions

From androidx.leanback.widget.FacetProvider
abstract Any?
getFacet(facetClass: Class<Any!>)

Queries optional implemented facet.

From androidx.leanback.widget.Presenter.ViewHolder
Any!
getFacet(facetClass: Class<Any!>!)

Queries optional implemented facet.

Unit
setFacet(facetClass: Class<Any!>!, facetImpl: Any!)

Sets dynamic implemented facet in addition to basic ViewHolder functions.

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

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

BaseOnItemViewClickedListener!

Returns the listener for item click event.

BaseOnItemViewSelectedListener!

Returns the listener for item or row selection.

View.OnKeyListener!

Returns the key listener.

Row!

Returns the row bound to this ViewHolder.

Any!

Returns the Row object bound to this ViewHolder.

Float

Returns the current selection level of the Row.

Any?

Return currently selected item inside a row ViewHolder.

Presenter.ViewHolder?

Return ViewHolder of currently selected item inside a row ViewHolder.

Boolean

Returns whether the Row is in its expanded state.

Boolean

Returns whether the Row is selected.

Unit
setActivated(activated: Boolean)

Sets the row view's activated status.

Unit

Sets the listener for item click event.

Unit

Sets the listener for item or row selection.

Unit

Sets a key listener.

Unit

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

Public constructors

ViewHolder

Added in 1.1.0
ViewHolder(rootView: View!, descriptionPresenter: Presenter!)

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 functions

getCurrentPositionView

Added in 1.1.0
fun getCurrentPositionView(): TextView!

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
fun getDescriptionViewHolder(): Presenter.ViewHolder!
Returns
Presenter.ViewHolder!

The ViewHolder for description.

getDurationView

Added in 1.1.0
fun getDurationView(): TextView!

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
fun setPlaybackSeekUiClient(client: PlaybackSeekUi.Client!): Unit

Interface to be implemented by UI widget to support PlaybackSeekUi.

Protected functions

onSetCurrentPositionLabel

Added in 1.1.0
protected fun onSetCurrentPositionLabel(currentTimeMs: Long): Unit

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 1.1.0
protected fun onSetDurationLabel(totalTimeMs: Long): Unit

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.