DividerPresenter


public class DividerPresenter extends Presenter


DividerPresenter provides a default presentation for DividerRow in HeadersFragment.

Summary

Public constructors

Public methods

void
onBindViewHolder(
    @NonNull Presenter.ViewHolder viewHolder,
    @Nullable Object item
)

Binds a View to an item.

@NonNull 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(
    @NonNull Presenter.ViewHolder viewHolder,
    @NonNull Object item,
    @NonNull 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

Added in 1.1.0
public DividerPresenter()

Public methods

onBindViewHolder

Added in 1.2.0-alpha04
public void onBindViewHolder(
    @NonNull Presenter.ViewHolder viewHolder,
    @Nullable Object item
)

Binds a View to an item.

onCreateViewHolder

Added in 1.2.0-alpha04
public @NonNull Presenter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent)

Creates a new View.

onUnbindViewHolder

Added in 1.2.0-alpha04
public void onUnbindViewHolder(@NonNull 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.