Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
Android 0.0.0 Developer Preview
belongs to Maven artifact androidx.leanback:leanback:1.1.0-alpha01

SinglePresenterSelector

public final class SinglePresenterSelector
extends PresenterSelector

java.lang.Object
   ↳ androidx.leanback.widget.PresenterSelector
     ↳ androidx.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

Public constructors

SinglePresenterSelector

public SinglePresenterSelector (Presenter presenter)

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

Public methods

getPresenter

public Presenter getPresenter (Object item)

Returns a presenter for the given item.

Parameters
item Object

Returns
Presenter

getPresenters

public Presenter[] getPresenters ()

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

Returns
Presenter[]