Most visited

Recently visited

ClassPresenterSelector

public final class ClassPresenterSelector
extends PresenterSelector

java.lang.Object
   ↳ android.support.v17.leanback.widget.PresenterSelector
     ↳ android.support.v17.leanback.widget.ClassPresenterSelector


Presenter根据项目的Java类选择 Presenter

Summary

Public constructors

ClassPresenterSelector()

Public methods

ClassPresenterSelector addClassPresenter(Class<?> cls, Presenter presenter)

设置要用于给定类的演示者。

ClassPresenterSelector addClassPresenterSelector(Class<?> cls, PresenterSelector presenterSelector)

设置用于给定类的演示者选择器。

Presenter getPresenter(Object item)

返回给定项目的演示者。

Presenter[] getPresenters()

返回所有可能演示者的数组。

Inherited methods

From class android.support.v17.leanback.widget.PresenterSelector
From class java.lang.Object

Public constructors

ClassPresenterSelector

ClassPresenterSelector ()

Public methods

addClassPresenter

ClassPresenterSelector addClassPresenter (Class<?> cls, 
                Presenter presenter)

设置要用于给定类的演示者。

Parameters
cls Class: The data model class to be rendered.
presenter Presenter: The presenter that renders the objects of the given class.
Returns
ClassPresenterSelector This ClassPresenterSelector object.

addClassPresenterSelector

ClassPresenterSelector addClassPresenterSelector (Class<?> cls, 
                PresenterSelector presenterSelector)

设置用于给定类的演示者选择器。

Parameters
cls Class: The data model class to be rendered.
presenterSelector PresenterSelector: The presenter selector that finds the right presenter for a given class.
Returns
ClassPresenterSelector This ClassPresenterSelector object.

getPresenter

Presenter getPresenter (Object item)

返回给定项目的演示者。

Parameters
item Object
Returns
Presenter

getPresenters

Presenter[] getPresenters ()

返回所有可能演示者的数组。 返回的数组不应该被修改。

Returns
Presenter[]

Hooray!