Skip to main content
List-based components like 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

Replacing the Adapter

Use setAdapter to replace the default adapter with a custom implementation:

Data Manipulation API

The adapter provides methods to programmatically manage the list data:

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: