public class

ListRowPresenter.ViewHolder

extends RowPresenter.ViewHolder

 java.lang.Object

androidx.leanback.widget.Presenter.ViewHolder

androidx.leanback.widget.RowPresenter.ViewHolder

↳androidx.leanback.widget.ListRowPresenter.ViewHolder

Overview

ViewHolder for the ListRowPresenter.

Summary

Fields
from RowPresenter.ViewHoldermColorDimmer
from Presenter.ViewHolderview
Constructors
publicViewHolder(View rootView, HorizontalGridView gridView, ListRowPresenter p)

Methods
public final ItemBridgeAdaptergetBridgeAdapter()

Gets ItemBridgeAdapter that creates the list of items.

public final HorizontalGridViewgetGridView()

Gets HorizontalGridView that shows a list of items.

public Presenter.ViewHoldergetItemViewHolder(int position)

Gets ViewHolder at a position in adapter.

public final ListRowPresentergetListRowPresenter()

Gets ListRowPresenter that creates this ViewHolder.

public java.lang.ObjectgetSelectedItem()

Return currently selected item inside a row ViewHolder.

public Presenter.ViewHoldergetSelectedItemViewHolder()

Return RowPresenter.ViewHolder of currently selected item inside a row ViewHolder.

public intgetSelectedPosition()

Gets selected item position in adapter.

from RowPresenter.ViewHoldergetHeaderViewHolder, getOnItemViewClickedListener, getOnItemViewSelectedListener, getOnKeyListener, getRow, getRowObject, getSelectLevel, isExpanded, isSelected, setActivated, setOnItemViewClickedListener, setOnItemViewSelectedListener, setOnKeyListener, syncActivatedStatus
from Presenter.ViewHoldergetFacet, setFacet
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public ViewHolder(View rootView, HorizontalGridView gridView, ListRowPresenter p)

Methods

public final ListRowPresenter getListRowPresenter()

Gets ListRowPresenter that creates this ViewHolder.

Returns:

ListRowPresenter that creates this ViewHolder.

public final HorizontalGridView getGridView()

Gets HorizontalGridView that shows a list of items.

Returns:

HorizontalGridView that shows a list of items.

public final ItemBridgeAdapter getBridgeAdapter()

Gets ItemBridgeAdapter that creates the list of items.

Returns:

ItemBridgeAdapter that creates the list of items.

public int getSelectedPosition()

Gets selected item position in adapter.

Returns:

Selected item position in adapter.

public Presenter.ViewHolder getItemViewHolder(int position)

Gets ViewHolder at a position in adapter. Returns null if the item does not exist or the item is not bound to a view.

Parameters:

position: Position of the item in adapter.

Returns:

ViewHolder bounds to the item.

public Presenter.ViewHolder getSelectedItemViewHolder()

Return RowPresenter.ViewHolder of currently selected item inside a row ViewHolder.

Returns:

The selected item's ViewHolder.

public java.lang.Object getSelectedItem()

Return currently selected item inside a row ViewHolder.

Returns:

The selected item.