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 implementation for header using TextView. If subclass override and creates its own view, subclass must also override onSelectLevelChanged(ViewHolder).

Summary

Nested Classes
class RowHeaderPresenter.ViewHolder  
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)
Protected Methods
static float getFontDescent(TextView textView, Paint fontMeasurePaint)
void onSelectLevelChanged(RowHeaderPresenter.ViewHolder holder)
[Expand]
Inherited Methods
From class android.support.v17.leanback.widget.Presenter
From class java.lang.Object

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)

Protected Methods

protected static float getFontDescent (TextView textView, Paint fontMeasurePaint)

protected void onSelectLevelChanged (RowHeaderPresenter.ViewHolder holder)