added in version 22.1.0
belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1

SinglePresenterSelector

public final class SinglePresenterSelector
extends PresenterSelector

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


A PresenterSelector that always returns the same Presenter. Useful for rows of items of the same type that are all rendered the same way.

Summary

Public constructors

SinglePresenterSelector(Presenter presenter)

Public methods

Presenter getPresenter(Object item)

Returns a presenter for the given item.

Presenter[] getPresenters()

Returns an array of all possible presenters.

Inherited methods

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

Public constructors

SinglePresenterSelector

added in version 22.1.0
SinglePresenterSelector (Presenter presenter)

Parameters
presenter Presenter: The Presenter to return for every item.

Public methods

getPresenter

added in version 22.1.0
Presenter getPresenter (Object item)

Returns a presenter for the given item.

Parameters
item Object

Returns
Presenter

getPresenters

added in version 24.1.0
Presenter[] getPresenters ()

Returns an array of all possible presenters. The returned array should not be modified.

Returns
Presenter[]