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
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
).
Functions
Cleans up any resources when the view is recycled. It removes the click listener from the itemView and sets the doAction to null.