SeslAppPickerView
An abstract base class for views that display a list or grid of applications, allowing users to pick one or more.
This class extends RecyclerView and implements several interfaces to manage application data, selection state, and user interactions.
Key features:
Supports both list and grid layouts.
Handles different ordering options for the application list.
Allows customization of subheader appearance (solid or transparent).
Provides methods for adding, removing, and updating application items.
Manages item selection state.
Integrates with AppDataRepository for data fetching and SelectStateLoader for managing selection.
Uses strategy pattern for customizing data handling and presentation logic.
Subclasses must implement getAppPickerAdapter and getLayoutManager to provide the specific adapter and layout manager for the chosen view type (list or grid).
XML attributes:
strategy
: (Optional) The fully qualified class name of the Strategy implementation to use. Defaults toandroidx.picker.controller.strategy.AppItemStrategy
.appPickerContextClass
: (Optional) The fully qualified class name of theandroidx.picker.di.AppPickerContext
implementation to use. Defaults toandroidx.picker.di.AppPickerContext
.seslRoundedCorner
: (Optional) Integer value to set the rounded corner radius for items. Defaults to 15.pickerApp_subHeaderType
: (Optional) Defines the subheader style. Can beSUBHEADER_TYPE_SOLID
(0) orSUBHEADER_TYPE_TRANSPARENT
(1). Defaults toSUBHEADER_TYPE_SOLID
.
Inheritors
Types
Properties
Convenience property for ViewDataController.appDataList
The repository responsible for providing application data.
The order in which the application list is sorted.
The adapter responsible for managing the header and footer views in the list.
Functions
Convenience method for ViewDataController.getAppData
Returns an AbsAdapter instance to be used for the given viewType type.
Returns a LayoutManager instance to be used for the given view type.
Initializes the view and sets up any required resources or listeners. This is be called inside init of the concrete subclasses after setting the viewType.
Called to set and update the click listener for viewHolder's item view.
Removes a specific application item from the list.
Removes a list of AppData items from the view.
Sets the listener to be called when an action button in an item is clicked.
Sets the listener to be called when an item in the list is clicked.
Sets a listener to be notified of changes in the selection state of items.
Sets a search filter on the adapter.
Updates the selection state of all applications currently displayed in the list.
Smoothly scrolls the list to the item corresponding to the given AppInfo.
Submits a new list of AppData to be displayed.
Updates an existing application item in the list with new data.
Updates the list of selectable items in the SelectStateLoader.