Android APIs
public class

RowHeaderPresenter

extends Presenter
java.lang.Object
   ↳ android.support.v17.leanback.widget.Presenter
     ↳ android.support.v17.leanback.widget.RowHeaderPresenter

Class Overview

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

Summary

Nested Classes
class RowHeaderPresenter.ViewHolder A ViewHolder for the RowHeaderPresenter. 
Public Constructors
RowHeaderPresenter()
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 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 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.
[Expand]
Inherited Methods
From class android.support.v17.leanback.widget.Presenter
From class java.lang.Object
From interface android.support.v17.leanback.widget.FacetProvider

Public Constructors

public RowHeaderPresenter ()

Public Methods

public int getSpaceUnderBaseline (RowHeaderPresenter.ViewHolder holder)

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

public boolean isNullItemVisibilityGone ()

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

public void onBindViewHolder (Presenter.ViewHolder viewHolder, Object item)

Binds a View to an item.

public Presenter.ViewHolder onCreateViewHolder (ViewGroup parent)

Creates a new View.

public void onUnbindViewHolder (Presenter.ViewHolder viewHolder)

Unbinds a View from an item. Any expensive references may be released here, and any fields that are not bound for every item should be cleared here.

public void setNullItemVisibilityGone (boolean nullItemVisibilityGone)

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

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

Sets the select level.

Protected Methods

protected static float getFontDescent (TextView textView, Paint fontMeasurePaint)

protected void onSelectLevelChanged (RowHeaderPresenter.ViewHolder holder)

Called when the select level changes. The default implementation sets the alpha on the view.