Stay organized with collections Save and categorize content based on your preferences.

DividerPresenter

public class DividerPresenter extends Presenter


DividerPresenter provides a default presentation for DividerRow in HeadersFragment.

Summary

Public constructors

Public methods

void

Binds a View to an item.

Presenter.ViewHolder

Creates a new View.

void

Unbinds a View from an item.

Inherited methods

From androidx.leanback.widget.FacetProvider
abstract @Nullable Object
getFacet(@NonNull Class<Object> facetClass)

Queries optional implemented facet.

From androidx.leanback.widget.Presenter
static void

Utility method for removing all running animations on a view.

final Object
getFacet(Class<Object> facetClass)

Queries optional implemented facet.

void
onBindViewHolder(
    Presenter.ViewHolder viewHolder,
    Object item,
    List<Object> payloads
)

Binds a View to an item with a list of payloads.

void

Called when a view created by this presenter has been attached to a window.

void

Called when a view created by this presenter has been detached from its window.

final void
setFacet(Class<Object> facetClass, Object facetImpl)

Sets dynamic implemented facet in addition to basic Presenter functions.

void

Called to set a click listener for the given view holder.

Public constructors

DividerPresenter

public DividerPresenter()

Public methods

onBindViewHolder

public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item)

Binds a View to an item.

onCreateViewHolder

public Presenter.ViewHolder onCreateViewHolder(ViewGroup parent)

Creates a new View.

onUnbindViewHolder

public void onUnbindViewHolder(Presenter.ViewHolder viewHolder)

Unbinds a View from an item. Any expensive references may be released here, and any fields that are not bound for every item should be cleared here.