PlaybackRowPresenter

abstract class PlaybackRowPresenter : RowPresenter

Known direct subclasses
PlaybackControlsRowPresenter

A PlaybackControlsRowPresenter renders a PlaybackControlsRow to display a series of playback control buttons.

PlaybackTransportRowPresenter

A PlaybackTransportRowPresenter renders a PlaybackControlsRow to display a series of playback control buttons.


Subclass of RowPresenter that can define the desired behavior when the view reappears. This is presently used by PlaybackControlsRowPresenter to update the UI after we show/hide the controls view.

Summary

Nested types

This container is used for trapping click events and passing them to the playback controls.

Public constructors

Public functions

Unit

Provides hook to update the UI when the view reappears.

Inherited Constants

From androidx.leanback.widget.RowPresenter
const Int

Don't synchronize row view activated status with selected status or expanded status, application will do its own through setActivated.

const Int

Synchronizes row view's activated status to expand status of the row view holder.

const Int

Sets the row view's activated status to true when both expand and selected are true.

const Int

Synchronizes row view's activated status to selected status of the row view holder.

Inherited functions

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

Queries optional implemented facet.

From androidx.leanback.widget.Presenter
java-static Unit

Utility method for removing all running animations on a view.

Any!
getFacet(facetClass: Class<Any!>!)

Queries optional implemented facet.

abstract Unit
onBindViewHolder(viewHolder: Presenter.ViewHolder, item: Any?)

Binds a View to an item.

Unit
onBindViewHolder(
    viewHolder: Presenter.ViewHolder,
    item: Any,
    payloads: (Mutable)List<Any!>
)

Binds a View to an item with a list of payloads.

abstract Presenter.ViewHolder

Creates a new View.

abstract Unit

Unbinds a View from an item.

Unit

Called when a view created by this presenter has been attached to a window.

Unit

Called when a view created by this presenter has been detached from its window.

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

Sets dynamic implemented facet in addition to basic Presenter functions.

Unit
setOnClickListener(
    holder: Presenter.ViewHolder!,
    listener: View.OnClickListener!
)

Called to set a click listener for the given view holder.

From androidx.leanback.widget.RowPresenter
abstract RowPresenter.ViewHolder

Called to create a ViewHolder object for a Row.

Unit

This method is only called from onRowViewSelected onRowViewSelected.

Unit

Freezes/unfreezes the row, typically used when a transition starts/ends.

RowHeaderPresenter!

Returns the Presenter used for rendering the header, or null if none has been set.

RowPresenter.ViewHolder!

Returns the RowPresenter.ViewHolder from the given RowPresenter ViewHolder.

Boolean

Returns true if the row selection effect is enabled.

Float

Returns the current select level.

Int

Returns the policy of updating row view activated status.

Unit

Called after a RowPresenter.ViewHolder is created for a Row.

Boolean

Returns true if the Row view should clip its children.

Boolean

Returns true if this RowPresenter is using the default dimming effect.

Unit

Binds the given row object to the given ViewHolder.

Unit
onBindViewHolder(viewHolder: Presenter.ViewHolder, item: Any?)

Binds a View to an item.

Presenter.ViewHolder!

Creates a new View.

Unit

Invoked when the row view is attached to the window.

Unit

Invoked when the row view is detached from the window.

Unit

Called when the row view's expanded state changes.

Unit

Called when the given row view changes selection state.

Unit

Callback when the select level changes.

Unit

Unbinds the given ViewHolder.

Unit

Unbinds a View from an item.

Unit

Called when a view created by this presenter has been attached to a window.

Unit

Called when a view created by this presenter has been detached from its window.

Unit
setEntranceTransitionState(
    holder: RowPresenter.ViewHolder,
    afterEntrance: Boolean
)

Changes the visibility of views.

Unit

Sets the Presenter used for rendering the header.

Unit

Sets the expanded state of a Row view.

Unit

Sets the selected state of a Row view.

Unit
setSelectEffectEnabled(applyDimOnSelect: Boolean)

Enables or disables the row selection effect.

Unit

Sets the current select level to a value between 0 (unselected) and 1 (selected).

Unit
setSyncActivatePolicy(syncActivatePolicy: Int)

Sets the policy of updating row view activated status.

Public constructors

PlaybackRowPresenter

Added in 1.1.0
PlaybackRowPresenter()

Public functions

onReappear

Added in 1.1.0
fun onReappear(rowViewHolder: RowPresenter.ViewHolder): Unit

Provides hook to update the UI when the view reappears.