DividerPresenter


class DividerPresenter : Presenter


DividerPresenter provides a default presentation for DividerRow in HeadersFragment.

Summary

Public constructors

Public functions

Unit
onBindViewHolder(viewHolder: Presenter.ViewHolder, item: Any?)

Binds a View to an item.

Presenter.ViewHolder

Creates a new View.

Unit

Unbinds a View from an item.

Inherited functions

From androidx.leanback.widget.FacetProvider
abstract Any?
getFacet(facetClass: Class<Any!>)

Queries optional implemented facet.

From androidx.leanback.widget.Presenter
java-static Unit

Utility method for removing all running animations on a view.

Any!
getFacet(facetClass: Class<Any!>!)

Queries optional implemented facet.

Unit
onBindViewHolder(
    viewHolder: Presenter.ViewHolder,
    item: Any,
    payloads: (Mutable)List<Any!>
)

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

Unit

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

Unit

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

Unit
setFacet(facetClass: Class<Any!>!, facetImpl: Any!)

Sets dynamic implemented facet in addition to basic Presenter functions.

Unit
setOnClickListener(
    holder: Presenter.ViewHolder!,
    listener: View.OnClickListener!
)

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

Public constructors

DividerPresenter

Added in 1.1.0
DividerPresenter()

Public functions

onBindViewHolder

Added in 1.2.0-alpha04
fun onBindViewHolder(viewHolder: Presenter.ViewHolder, item: Any?): Unit

Binds a View to an item.

onCreateViewHolder

Added in 1.2.0-alpha04
fun onCreateViewHolder(parent: ViewGroup): Presenter.ViewHolder

Creates a new View.

onUnbindViewHolder

Added in 1.2.0-alpha04
fun onUnbindViewHolder(viewHolder: Presenter.ViewHolder): Unit

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.