Architecture
Each component is composed of three collaborating classes:Accessing Internal Layers
The View layer provides accessor methods to reach the other layers:- Kotlin
- Java
Customization Categories
The UI Kit provides eight categories of customization entry points. Each category has a dedicated guide:View Slots
Replace specific regions of a component’s UI (leading view, title, subtitle, trailing view) using the ViewHolderListener pattern.
Styles
Customize visual appearance using XML theme attributes or programmatic setter methods on the View layer.
ViewModel & Data
Configure data fetching with RequestBuilders, observe LiveData, and call mutation methods on the ViewModel.
Adapters
Access or replace the RecyclerView Adapter to control how list items are rendered and manage list data.
Events & Callbacks
Handle click events, selection mode, and global UI Kit events with component-level and static event listeners.
State Views
Replace or restyle the default empty, error, and loading state views with custom layouts.
Text Formatters
Create custom text processors for hashtags, mentions, links, or any pattern using the CometChatTextFormatter API.
Menu & Options
Add, replace, or extend context menu actions and composer attachment options on components.