added in version 1.0.0
belongs to Maven artifact androidx.leanback:leanback:1.0.0

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

added in version 1.0.0
public SinglePresenterSelector (Presenter presenter)

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

Public methods

getPresenter

added in version 1.0.0
public Presenter getPresenter (Object item)

Returns a presenter for the given item.

Parameters
item Object

Returns
Presenter

getPresenters

added in version 1.0.0
public Presenter[] getPresenters ()

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

Returns
Presenter[]