Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

SinglePresenterSelector

class SinglePresenterSelector : PresenterSelector
kotlin.Any
   ↳ 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

<init>(presenter: Presenter!)

Public methods

Presenter!
getPresenter(item: Any!)

Array<Presenter!>!

Public constructors

<init>

SinglePresenterSelector(presenter: Presenter!)
Parameters
presenter Presenter!: The Presenter to return for every item.

Public methods

getPresenter

fun getPresenter(item: Any!): Presenter!

getPresenters

fun getPresenters(): Array<Presenter!>!