CategoryViewData

data class CategoryViewData(val appData: CategoryAppData, val selectableItem: SelectableItem, val invisibleChildren: MutableList<ViewData>) : SearchableViewData, Selectable, AppSideViewData(source)

The ui model for a category item managed by androidx.picker.adapter.AbsAdapter.

This class holds the application-specific data (CategoryAppData), the selection state (SelectableItem), and a list of child items that are currently not visible but are part of this category. It implements interfaces for searchability, selection, and application-side data handling.

Constructors

Link copied to clipboard
constructor(appData: CategoryAppData, selectableItem: SelectableItem, invisibleChildren: MutableList<ViewData>)

Properties

Link copied to clipboard
open override val appData: CategoryAppData

The underlying application-specific data for this category.

Link copied to clipboard

The icon representing the category. This can be null if no icon is set.

Link copied to clipboard

A list of ViewData items that belong to this category but are currently not displayed. This can be used for features like "show more" or lazy loading.

Link copied to clipboard
open override val key: Any

The unique identifier for this item. This is used by diffing algorithms (like androidx.recyclerview.widget.DiffUtil) to compare items in the list. By default, the key is the object instance itself (this).

Link copied to clipboard
open override val searchable: List<String>

This property provides a list of strings that can be used to search the data. The strings should be representative of the data and should be able to be matched by the user's search query.

Link copied to clipboard
open override val selectableItem: SelectableItem

Manages the selection state of this category item.

Link copied to clipboard

The title or label associated with the category, derived from the appData's label.