CometChatConversations use a RecyclerView.Adapter to bind data to list items. You can access the default adapter to manipulate data, or replace it entirely with a custom implementation.
Accessing the Adapter
- Kotlin
- Java
Replacing the Adapter
UsesetAdapter to replace the default adapter with a custom implementation:
- Kotlin
- Java
Data Manipulation API
The adapter provides methods to programmatically manage the list data:- Kotlin
- Java
View Slots on the Adapter
The adapter exposes the same view slot setters as the View layer. When you set a view slot on the View (e.g.,conversations.setSubtitleView(...)), it delegates to the adapter internally. You can also set view slots directly on the adapter:
Setting view slots directly on the adapter is useful when you’ve replaced the adapter with
setAdapter and need to configure it before attaching.
Adapter Style Propagation
The adapter has its own style setter methods. These are typically called internally by the View layer, but you can use them directly when working with a custom adapter:Related
- View Slots — Learn the ViewHolderListener pattern used by adapter view slots.
- ViewModel & Data — Manage data at the ViewModel level instead of the adapter.
- Customization Overview — See all customization categories.