Android APIs
public static class

RowPresenter.ViewHolder

extends Presenter.ViewHolder
java.lang.Object
   ↳ android.support.v17.leanback.widget.Presenter.ViewHolder
     ↳ android.support.v17.leanback.widget.RowPresenter.ViewHolder
Known Direct Subclasses

Class Overview

A view holder for a Row.

Summary

Fields
protected final ColorOverlayDimmer mColorDimmer
[Expand]
Inherited Fields
From class android.support.v17.leanback.widget.Presenter.ViewHolder
Public Constructors
RowPresenter.ViewHolder(View view)
Constructor for ViewHolder.
Public Methods
final RowHeaderPresenter.ViewHolder getHeaderViewHolder()
Returns the view holder for the Row header for this Row.
final Row getRow()
Returns the Row bound to the View in this ViewHolder.
final float getSelectLevel()
Returns the current selection level of the Row.
final boolean isExpanded()
Returns whether the Row is in its expanded state.
final boolean isSelected()
Returns whether the Row is selected.
final void setActivated(boolean activated)
Sets the row view's activated status.
final void syncActivatedStatus(View view)
Synchronizes the activated status of view to the last value passed through setActivated(boolean).
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected final ColorOverlayDimmer mColorDimmer

Public Constructors

public RowPresenter.ViewHolder (View view)

Constructor for ViewHolder.

Parameters
view The View bound to the Row.

Public Methods

public final RowHeaderPresenter.ViewHolder getHeaderViewHolder ()

Returns the view holder for the Row header for this Row.

public final Row getRow ()

Returns the Row bound to the View in this ViewHolder.

public final float getSelectLevel ()

Returns the current selection level of the Row.

public final boolean isExpanded ()

Returns whether the Row is in its expanded state.

Returns
  • true if the Row is expanded, false otherwise.

public final boolean isSelected ()

Returns whether the Row is selected.

Returns
  • true if the Row is selected, false otherwise.

public final void setActivated (boolean activated)

Sets the row view's activated status. The status will be applied to children through syncActivatedStatus(View). Application should only call this function when getSyncActivatePolicy() is SYNC_ACTIVATED_CUSTOM; otherwise the value will be overwritten when expanded or selected status changes.

public final void syncActivatedStatus (View view)

Synchronizes the activated status of view to the last value passed through setActivated(boolean). No operation if setActivated(boolean) is never called. Normally application does not need to call this method, ListRowPresenter automatically calls this method when a child is attached to list row. However if application writes its own custom RowPresenter, it should call this method when attaches a child to the row view.