RowHeaderPresenter

public class RowHeaderPresenter
extends Presenter

java.lang.Object
   ↳ androidx.leanback.widget.Presenter
     ↳ androidx.leanback.widget.RowHeaderPresenter


RowHeaderPresenter provides a default presentation for HeaderItem using a RowHeaderView and optionally a TextView for description. If a subclass creates its own view, the subclass must also override onCreateViewHolder(ViewGroup), onSelectLevelChanged(ViewHolder).

Summary

Nested classes

class RowHeaderPresenter.ViewHolder

A ViewHolder for the RowHeaderPresenter. 

Public constructors

RowHeaderPresenter()

Creates default RowHeaderPresenter using a title view and a description view.

Public methods

int getSpaceUnderBaseline(RowHeaderPresenter.ViewHolder holder)

Returns the space (distance in pixels) below the baseline of the text view, if one exists; otherwise, returns 0.

boolean isNullItemVisibilityGone()

Returns true if the view visibility is set to View.GONE when bound to null.

void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item)

Binds a View to an item.

Presenter.ViewHolder onCreateViewHolder(ViewGroup parent)

Creates a new View.

void onUnbindViewHolder(Presenter.ViewHolder viewHolder)

Unbinds a View from an item.

void setNullItemVisibilityGone(boolean nullItemVisibilityGone)

Optionally sets the view visibility to View.GONE when bound to null.

final void setSelectLevel(RowHeaderPresenter.ViewHolder holder, float selectLevel)

Sets the select level.

Protected methods

static float getFontDescent(TextView textView, Paint fontMeasurePaint)
void onSelectLevelChanged(RowHeaderPresenter.ViewHolder holder)

Called when the select level changes.

Inherited methods