SinglePresenterSelector


public final class SinglePresenterSelector extends PresenterSelector


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

Public methods

@Nullable Presenter

Returns a presenter for the given item.

@NonNull Presenter[]

Returns an array of all possible presenters.

Public constructors

SinglePresenterSelector

Added in 1.1.0
public SinglePresenterSelector(@NonNull Presenter presenter)
Parameters
@NonNull Presenter presenter

The Presenter to return for every item.

Public methods

getPresenter

Added in 1.2.0-alpha04
public @Nullable Presenter getPresenter(@Nullable Object item)

Returns a presenter for the given item.

getPresenters

public @NonNull Presenter[] getPresenters()

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