AbstractMediaListHeaderPresenter

public abstract class AbstractMediaListHeaderPresenter
extends RowPresenter

java.lang.Object
   ↳ androidx.leanback.widget.Presenter
     ↳ androidx.leanback.widget.RowPresenter
       ↳ androidx.leanback.widget.AbstractMediaListHeaderPresenter


Abstract presenter class for rendering the header for a list of media items in a playlist. The presenter creates a AbstractMediaListHeaderPresenter.ViewHolder for the TextView holding the header text.

Subclasses of this class must override onBindMediaListHeaderViewHolder(ViewHolder, Object) in order to bind their header text to the media list header view.

AbstractMediaItemPresenter can be used in conjunction with this presenter in order to display a playlist with a header view.

Summary

Nested classes

class AbstractMediaListHeaderPresenter.ViewHolder

The ViewHolder for the AbstractMediaListHeaderPresenter

Inherited constants

Public constructors

AbstractMediaListHeaderPresenter(Context context, int mThemeResId)

Constructor used for creating an abstract media-list header presenter of a given theme.

AbstractMediaListHeaderPresenter()

Constructor used for creating an abstract media-list header presenter.

Public methods

boolean isUsingDefaultSelectEffect()

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

void setBackgroundColor(int color)

Sets the background color for the row views within the playlist.

Protected methods

RowPresenter.ViewHolder createRowViewHolder(ViewGroup parent)

Called to create a ViewHolder object for a Row.

abstract void onBindMediaListHeaderViewHolder(AbstractMediaListHeaderPresenter.ViewHolder vh, Object item)

Binds the playlist header data model provided by the user to the AbstractMediaListHeaderPresenter.ViewHolder provided by the AbstractMediaListHeaderPresenter.

void onBindRowViewHolder(RowPresenter.ViewHolder vh, Object item)

Binds the given row object to the given ViewHolder.

Inherited methods