ComposableAllAppSwitchViewHolder

A concrete implementation of the ActionableComposableViewHolder that displays a switch to toggle the selection state of all apps.

This ViewHolder binds to AllAppsViewData and updates the switch's state based on the selectableItem's state. It also handles user interactions with the switch, updating the selectableItem accordingly.

Accessibility features are handled by making the switch non-focusable and non-clickable when accessibility services are enabled, relying on the parent item's accessibility handling.

Parameters

frameView

The view to be used by this ComposableActionViewHolder which is expected to be or to contain a SwitchCompat (with the ID R.id.switch_widget) and a 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 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.