ActionableComposableViewHolder

Abstract extension of ComposableViewHolder designed to be actionable, meaning it can trigger an action when clicked. The action to be performed is defined by the doAction supplier. Subclasses must implement the bindData method to bind data to the Composable content.

Parameters

frameView

The root view of the ViewHolder.

Inheritors

Constructors

Link copied to clipboard
constructor(frameView: View)

Properties

Link copied to clipboard

A Supplier that defines the action to be performed by this ComposableViewHolder.

Functions

Link copied to clipboard
abstract override fun bindData(viewData: ViewData)
Link copied to clipboard
open override fun onBind(itemView: View)

Binds click events on the parent ViewHolder's view to this ActionableComposableViewHolder's doAction if the parent view doesn't handle click events itself.

Link copied to clipboard
open override fun onViewRecycled(itemView: View)

Cleans up any resources when the view is recycled. It removes the click listener from the itemView and sets the doAction to null.