AppInfoViewData

data class AppInfoViewData(val appInfoData: AppInfoData, val iconFlow: AppIconFlow, val selectableItem: SelectableItem? = null, val spanCount: Int = 1, var onActionClick: (AppInfoViewData) -> Unit? = null) : SearchableViewData, AppInfoData, AppSideViewData, SpanData, Selectable, Highlightable(source)

The UI model for an application item managed by AbsAdapter.

This class combines application information (AppInfoData) with UI-specific properties like icon loading (AppIconFlow), selection state (SelectableItem), and layout information (SpanData). It also implements interfaces for searchability, highlighting, and handling action clicks.

Constructors

Link copied to clipboard
constructor(appInfoData: AppInfoData, iconFlow: AppIconFlow, selectableItem: SelectableItem? = null, spanCount: Int = 1, onActionClick: (AppInfoViewData) -> Unit? = null)

Properties

Link copied to clipboard
open override var actionIcon: Drawable?

An icon Drawable representing an action associated with the app, defaults to null.

Link copied to clipboard
open override val activityName: String
Link copied to clipboard
open override val appData: AppData

The AppData object which contains information about the application being presented in the picker.

Link copied to clipboard
open override val appInfo: AppInfo
Link copied to clipboard

The core application data.

Link copied to clipboard
open override var dimmed: Boolean

A boolean indicating if the app item should be displayed in a dimmed state, defaults to false.

Link copied to clipboard

An observable property indicating whether the item should be dimmed in the UI. This typically signifies that the item is not currently selectable or available. It is backed by the AppInfoData.dimmed property and allows for observing changes to it.

Link copied to clipboard
open override var extraLabel: String?

An additional text label for supplementary information, defaults to null.

Link copied to clipboard
open override var icon: Drawable?

The main icon Drawable for the app, defaults to null.

Link copied to clipboard

The flow responsible for loading the application icon.

Link copied to clipboard
open override var isValueInSubLabel: Boolean

A boolean indicating if the subLabel contains a value that should be specially handled or formatted, defaults to false.

Link copied to clipboard
open override val itemType: Int

The type of this item, used for view recycling in RecyclerView.

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 var label: String?

The primary text label for the app, defaults to null.

Link copied to clipboard

A callback function triggered when an action associated with this item is clicked.

Link copied to clipboard
open override val packageName: String
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? = null

The item representing the selectable state of this application.

Link copied to clipboard
open override var selected: Boolean

A boolean indicating if the app item is currently selected, defaults to false.

Link copied to clipboard
open override val spanCount: Int = 1

The number of columns this item should span in a grid layout.

Link copied to clipboard
open override var subIcon: Drawable?

A secondary icon Drawable, often displayed alongside the main icon, defaults to null.

Link copied to clipboard
open override var subLabel: String?

A secondary text label, often displayed below the main label, defaults to null.

Functions

Link copied to clipboard
Link copied to clipboard

Updates the current AppInfoViewData with new application data.