Most visited

Recently visited

ListRowPresenter.ViewHolder

public static class ListRowPresenter.ViewHolder
extends RowPresenter.ViewHolder

java.lang.Object
   ↳ android.support.v17.leanback.widget.Presenter.ViewHolder
     ↳ android.support.v17.leanback.widget.RowPresenter.ViewHolder
       ↳ android.support.v17.leanback.widget.ListRowPresenter.ViewHolder


ListRowPresenter的ViewHolder。

Summary

Inherited fields

From class android.support.v17.leanback.widget.RowPresenter.ViewHolder
From class android.support.v17.leanback.widget.Presenter.ViewHolder

Public constructors

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

Public methods

final ItemBridgeAdapter getBridgeAdapter()

获取创建项目列表的ItemBridgeAdapter。

final HorizontalGridView getGridView()

获取显示项目列表的HorizontalGridView。

Presenter.ViewHolder getItemViewHolder(int position)

获取适配器中某个位置的ViewHolder。

final ListRowPresenter getListRowPresenter()

获取创建此ViewHolder的ListRowPresenter。

int getSelectedPosition()

获取适配器中选定的项目位置。

Inherited methods

From class android.support.v17.leanback.widget.RowPresenter.ViewHolder
From class android.support.v17.leanback.widget.Presenter.ViewHolder
From class java.lang.Object
From interface android.support.v17.leanback.widget.FacetProvider

Public constructors

ListRowPresenter.ViewHolder

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

Parameters
rootView View
gridView HorizontalGridView
p ListRowPresenter

Public methods

getBridgeAdapter

ItemBridgeAdapter getBridgeAdapter ()

获取创建项目列表的ItemBridgeAdapter。

Returns
ItemBridgeAdapter ItemBridgeAdapter that creates the list of items.

getGridView

HorizontalGridView getGridView ()

获取显示项目列表的HorizontalGridView。

Returns
HorizontalGridView HorizontalGridView that shows a list of items.

getItemViewHolder

Presenter.ViewHolder getItemViewHolder (int position)

获取适配器中某个位置的ViewHolder。 如果项目不存在或者项目未绑定到视图,则返回null。

Parameters
position int: Position of the item in adapter.
Returns
Presenter.ViewHolder ViewHolder bounds to the item.

getListRowPresenter

ListRowPresenter getListRowPresenter ()

获取创建此ViewHolder的ListRowPresenter。

Returns
ListRowPresenter ListRowPresenter that creates this ViewHolder.

getSelectedPosition

int getSelectedPosition ()

获取适配器中选定的项目位置。

Returns
int Selected item position in adapter.

Hooray!