ComposableExpanderViewHolder

A concrete implementation of the ActionableComposableViewHolder for displaying and managing an expandable item, such as a category that can be collapsed or expanded to show/hide its children.

This ViewHolder is responsible for handling the expand/collapse interaction and updating the adapter accordingly. It expects the provided frameView to contain an ImageView with the ID R.id.image_button which acts as the toggle button, and a View with the ID R.id.switch_divider_widget which is used as a visual divider.

The expansion state is managed by modifying the underlying data set of the adapter. When an item is collapsed, its children (expected to be of type AppInfoViewData) are moved to an internal invisibleChildren list within the CategoryViewData. When expanded, these children are re-inserted into the adapter's data set.

Parameters

frameView

The root view of the item. This view must contain an ImageView (with the id R.id.image_button) and a divider View (with the id R.id.switch_divider_widget).

Constructors

Link copied to clipboard
constructor(frameView: View)

Functions

Link copied to clipboard
open override fun bindAdapter(adapter: AbsAdapter)
Link copied to clipboard
open override fun bindData(viewData: ViewData)
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.