ViewHolder
open class ViewHolder : PlaybackRowPresenter.ViewHolder, PlaybackSeekUi
A ViewHolder for the PlaybackControlsRow supporting seek UI.
Summary
Public constructors | |
---|---|
Constructor of ViewHolder of PlaybackTransportRowPresenter |
Public methods | |
---|---|
TextView! |
Returns the TextView that showing current position label. |
Presenter.ViewHolder! | |
TextView! |
Returns the TextView that showing total time label. |
open Unit |
setPlaybackSeekUiClient(client: PlaybackSeekUi.Client!) |
Protected methods | |
---|---|
open Unit |
onSetCurrentPositionLabel(currentTimeMs: Long) Called to update current time label. |
open Unit |
onSetDurationLabel(totalTimeMs: Long) Called to update total time label. |
Public constructors
<init>
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 methods
getCurrentPositionView
fun getCurrentPositionView(): TextView!
Returns the TextView that showing current position label. This method might be used in onSetCurrentPositionLabel
.
Return | |
---|---|
TextView! |
The TextView that showing current position label. |
getDescriptionViewHolder
fun getDescriptionViewHolder(): Presenter.ViewHolder!
Return | |
---|---|
Presenter.ViewHolder! |
The ViewHolder for description. |
getDurationView
fun getDurationView(): TextView!
Returns the TextView that showing total time label. This method might be used in onSetDurationLabel
.
Return | |
---|---|
TextView! |
The TextView that showing total time label. |
setPlaybackSeekUiClient
open fun setPlaybackSeekUiClient(client: PlaybackSeekUi.Client!): Unit
Protected methods
onSetCurrentPositionLabel
protected open 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
protected open 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. |