CometChatConversations displays all conversations for the currently logged-in user, showing recent messages, user or group details, and unread counts.
When to use this
- You need a screen that lists all one-on-one and group conversations for the logged-in user.
- You want to show the last message, unread badge count, and user/group avatar for each conversation.
- You need tap and long-press actions on conversation items (open chat, delete, pin, mute).
- You want to filter conversations by type (user or group), tags, or custom request builders.
- You need real-time updates when conversations are deleted or modified.
- You want to customize the conversation list appearance with styles, custom views, or text formatters.
Prerequisites
- CometChat SDK initialized with
CometChatUIKit.init()and a user logged in. - The
cometchat-chat-uikit-androiddependency added to your project. - A valid
layout_activity.xmlor Activity/Fragment where you will place the component.
Quick start
- Open your
layout_activity.xmlfile. - Add the
CometChatConversationsXML element:
layout_activity.xml
What this does: Adds the CometChatConversations component to your layout. It fills the available width and height and renders the conversation list for the logged-in user.
- Build and run your app.
- Verify that the conversation list appears with avatars, names, last messages, and unread badges.

- If you need to add the component programmatically instead of XML, see the Activity integration or Fragment integration subsections in Implementation.
Core concepts
CometChatConversations: The main component class that renders the conversation list. It can be added via XML layout, Activity, or Fragment.- Actions: Callbacks such as
setOnItemClick,setOnItemLongClick, andsetOnBackPressListenerthat let you respond to user interactions. - Filters: Use
ConversationsRequest.ConversationsRequestBuilderto filter conversations by type, limit, tags, user tags, or group tags. - Events: Global events emitted by the component (e.g.,
ccConversationDeleted) that you can listen to from anywhere in your app usingCometChatConversationEvents. - Style: XML theme styles (parent
CometChatConversationsStyle) applied viasetStyle()to customize colors, fonts, and sub-component styles. - Advanced views: Methods like
setLeadingView,setTitleView,setTrailingView,setItemView, andsetSubtitleViewthat let you replace default UI elements with custom layouts.
Implementation
Activity integration
What you’re changing: How you addCometChatConversations to an Activity programmatically.
- Where: Your Activity class (e.g.,
YourActivity.javaorYourActivity.kt). - Applies to:
CometChatConversations. - Default behavior: The component is not added until you set it as the content view.
- Override: Call
setContentView(new CometChatConversations(this))inonCreate. - Code:
- Java
- Kotlin
YourActivity.java
What this does: Creates a new CometChatConversations instance and sets it as the entire content view of the Activity. The conversation list renders immediately after the Activity is created.
- Verify: The conversation list fills the screen when the Activity launches.
Fragment integration
What you’re changing: How you addCometChatConversations to a Fragment.
- Where: Your Fragment class (e.g.,
YourFragment.javaorYourFragment.kt). - Applies to:
CometChatConversations. - Default behavior: The component is not added until you return it from
onCreateView. - Override: Return
new CometChatConversations(getContext())fromonCreateView. - Code:
- Java
- Kotlin
YourFragment.java
What this does: Creates a new CometChatConversations instance and returns it as the Fragment’s root view. The conversation list renders when the Fragment is displayed.
- Verify: The conversation list appears inside the Fragment’s container.
Actions
What you’re changing: How the component responds to user interactions such as taps, long-presses, back button, selection, errors, load completion, and empty states.- Where: Activity or Fragment where you hold a reference to
CometChatConversations(e.g.,cometchatConversations). - Applies to:
CometChatConversations. - Default behavior: Predefined actions execute automatically (e.g., tapping a conversation opens the chat, pressing back navigates to the previous screen).
- Override: Call the corresponding setter method to replace the default behavior with your own logic.
setOnItemClick
Function invoked when a conversation item is clicked, used to open a detailed chat screen.
- Java
- Kotlin
YourActivity.java
What this does: Replaces the default item-click behavior. When a user taps a conversation, your custom lambda executes instead of the built-in navigation.
setOnItemLongClick
Function executed when a conversation item is long-pressed, allowing additional actions like delete or select.
- Java
- Kotlin
YourActivity.java
What this does: Replaces the default long-press behavior. When a user long-presses a conversation, your custom lambda executes.
setOnBackPressListener
Triggered when the user presses the back button in the app bar. By default, it navigates to the previous activity.
- Java
- Kotlin
YourActivity.java
What this does: Overrides the default back-press navigation. When the user taps the back button, your custom logic runs instead.
setOnSelect
Called when an item from the fetched list is selected, useful for multi-selection features.
- Java
- Kotlin
YourActivity.java
What this does: Registers a callback that fires when the user selects one or more conversations. The callback receives the list of selected Conversation objects.
setOnError
Listens for any errors that occur in the Conversations component. This does not change the component’s behavior.
- Java
- Kotlin
YourActivity.java
What this does: Registers an error listener. If the component encounters an error (e.g., network failure), your callback receives the CometChatException.
setOnLoad
Invoked when the list is successfully fetched and loaded, helping track component readiness.
- Java
- Kotlin
YourActivity.java
What this does: Registers a callback that fires after the conversation list is fetched and rendered. The callback receives the list of loaded Conversation objects.
setOnEmpty
Called when the list is empty, enabling custom handling such as showing a placeholder message.
- Java
- Kotlin
YourActivity.java
What this does: Registers a callback that fires when the conversation list has no items. Use this to show a custom empty-state message or trigger other logic.
- Verify: After setting an action callback, trigger the corresponding user interaction (tap, long-press, back, select) and confirm your custom logic executes instead of the default behavior.
Filters
What you’re changing: Which conversations appear in the list.- Where: Activity or Fragment where you hold a reference to
CometChatConversations. - Applies to:
CometChatConversations. - Default behavior: All conversations for the logged-in user are fetched and displayed.
- Override: Create a
ConversationsRequest.ConversationsRequestBuilder, configure it, and pass it tosetConversationsRequestBuilder.
- Conversation Type: Filters on type of Conversation,
UserorGroups. - Limit: Number of conversations fetched in a single request.
- WithTags: Filter on fetching conversations containing tags.
- Tags: Filters on specific
Tag. - UserTags: Filters on specific User
Tag. - GroupTags: Filters on specific Group
Tag.
- Code:
- Java
- Kotlin
YourActivity.java
What this does: Creates aConversationsRequestBuilderthat filters conversations to show only user (one-on-one) conversations with a limit of 50 per fetch. The builder is then applied to theCometChatConversationscomponent.
- Verify: The conversation list shows only user conversations (no group conversations) and fetches at most 50 items per request.
Events
What you’re changing: How your app reacts to global events emitted by the Conversations component.- Where: Any Activity, Fragment, or class where you want to listen for conversation events.
- Applies to:
CometChatConversationEvents. - Default behavior: No external listeners are registered. Events are emitted but not handled outside the component.
- Override: Add a listener using
CometChatConversationEvents.addListenerand remove it when no longer needed usingCometChatConversationEvents.removeListener.
ConversationDeleted
This event is emitted when the user deletes a conversation.- Code:
- Java
- Kotlin
Add Listener
What this does: Registers a global event listener tagged with your identifier. When a conversation is deleted, theccConversationDeletedcallback fires with the deletedConversationobject. CallremoveListenerwith the same tag to unsubscribe.
- Verify: Delete a conversation in the UI and confirm your
ccConversationDeletedcallback fires with the correctConversationobject.
Style
What you’re changing: The visual appearance of the Conversations component using XML theme styles.- Where:
themes.xmlfor style definitions, and your Activity/Fragment for applying the style. - Applies to:
CometChatConversations. - Default behavior: The component uses the default
CometChatConversationsStyle. - Override: Define a custom style with parent
CometChatConversationsStyleinthemes.xml, then callsetStyle()on the component.

- Code:
themes.xml
What this does: Defines three custom styles:CustomAvatarStylesets the avatar corner radius to 8dp and background color to#FBAA75;CustomBadgeCountStylesets the badge background to#F76808with white text;CustomConversationsStyleapplies both sub-styles to the conversations component.
- Java
- Kotlin
What this does: Applies theTo know more such attributes, visit the attributes file.CustomConversationsStyletheme to theCometChatConversationscomponent, changing the avatar and badge appearance.
- Verify: The conversation list avatars display with rounded corners (8dp radius) and an orange background (
#FBAA75), and unread badges show an orange background (#F76808) with white text.
Functionality
What you’re changing: Small functional customizations such as toggling visibility of UI elements, setting custom sounds, and configuring selection modes.- Where: Activity or Fragment where you hold a reference to
CometChatConversations. - Applies to:
CometChatConversations. - Default behavior: All UI elements are visible with default settings.
- Override: Call the corresponding method on the component instance.
| Methods | Description | Code |
|---|---|---|
setBackIconVisibility | Toggles visibility for the back button in the app bar | .setBackIconVisibility(View.VISIBLE); |
setToolbarVisibility | Toggles visibility for the toolbar in the app bar | .setToolbarVisibility(View.GONE); |
setLoadingStateVisibility | Hides the loading state while fetching conversations | .setLoadingStateVisibility(View.GONE); |
setDeleteConversationOptionVisibility | Toggles visibility for the delete option on long press | .setDeleteConversationOptionVisibility(View.GONE); |
setErrorStateVisibility | Hides the error state on fetching conversations | .setErrorStateVisibility(View.GONE); |
setEmptyStateVisibility | Hides the empty state on fetching conversations | .setEmptyStateVisibility(View.GONE); |
setSeparatorVisibility | Controls visibility of separators in the list view | .setSeparatorVisibility(View.GONE); |
setUsersStatusVisibility | Controls visibility of the online status indicator | .setUsersStatusVisibility(View.GONE); |
setGroupTypeVisibility | Controls visibility of the group type indicator | .setGroupTypeVisibility(View.GONE); |
setReceiptsVisibility | Hides receipts shown in the subtitle without disabling read/delivered marking | .setReceiptsVisibility(View.GONE); |
disableSoundForMessages | Disables sound notifications for incoming messages | .disableSoundForMessages(true); |
setCustomSoundForMessages | Sets a custom sound file for incoming message notifications | .setCustomSoundForMessages(com.cometchat.chatuikit.R.raw.cometchat_beep2); |
setSelectionMode | Determines the selection mode (single or multiple) | .setSelectionMode(UIKitConstants.SelectionMode.MULTIPLE); |
- Verify: After calling a visibility method, confirm the corresponding UI element is shown or hidden. After calling
disableSoundForMessages(true), confirm no sound plays on incoming messages.
Advanced views
What you’re changing: The default UI elements of conversation list items and the component’s chrome (loading, empty, error states, overflow menu, date formatting, text formatting).- Where: Activity or Fragment where you hold a reference to
CometChatConversations. - Applies to:
CometChatConversations. - Default behavior: The component renders its built-in views for each part of the conversation item and component chrome.
- Override: Call the corresponding setter method and provide a custom view or callback.
setDateTimeFormatter
Provides a custom implementation of DateTimeFormatterCallback to configure how time and date values are displayed. Each method corresponds to a specific case:
time(long timestamp)— Custom full timestamp formattoday(long timestamp)— Called when a message is from todayyesterday(long timestamp)— Called for yesterday’s messageslastWeek(long timestamp)— Messages from the past weekotherDays(long timestamp)— Older messagesminute(long timestamp)/hour(long timestamp)— Exact time unitminutes(long diffInMinutesFromNow, long timestamp)— e.g., “5 minutes ago”hours(long diffInHourFromNow, long timestamp)— e.g., “2 hours ago”
- Java
- Kotlin
What this does: Overrides the default date/time formatting for conversation timestamps. Today’s messages show “Today”, yesterday’s show “Yesterday”, recent messages show “X mins ago” or “X hrs ago”, last week’s show “Last Week”, and older messages show the full date in “dd MMM yyyy” format.
setOptions
Sets a predefined list of actions that users can perform when they long press a conversation in the list. This replaces the default options entirely.
- Java
- Kotlin
What this does: Replaces the default long-press options with an empty list, effectively removing all long-press menu items.

- Java
- Kotlin
What this does: Replaces the default long-press options with a single “Delete” menu item. The item uses the error color from the theme and shows a toast when tapped.
addOptions
Extends the existing set of long-press actions without removing the default ones.
- Java
- Kotlin
What this does: Appends an empty list to the existing long-press options, leaving the defaults unchanged. Replace the empty list with your custom MenuItem objects to add new actions.

- Java
- Kotlin
What this does: Appends three custom menu items (Archive, Pin, Mark as read) to the existing default long-press options. Each item uses the primary text color from the theme and shows a toast when tapped.
setLoadingView
Sets a custom loading view displayed when data is being fetched.
- Java
- Kotlin
What this does: Replaces the default loading spinner with your custom layout resource. The custom view displays while conversations are being fetched.
setEmptyView
Configures a custom view displayed when there are no conversations in the list.
- Java
- Kotlin
What this does: Replaces the default empty state with your custom layout resource. The custom view displays when the conversation list has no items.
setErrorView
Defines a custom error state view that appears when an issue occurs while loading conversations.
- Java
- Kotlin
What this does: Replaces the default error state with your custom layout resource. The custom view displays when the component encounters an error during data fetching.
setLeadingView
Sets a custom leading view element that appears at the beginning of each conversation item (e.g., avatars with online/offline status indicators).
- Java
- Kotlin
What this does: Registers aConversationsViewHolderListenerthat provides a custom view for the leading (left) area of each conversation item.createViewinflates your layout, andbindViewpopulates it with conversation data.

drawable/chat_dots.xml
What this does: Defines a vector drawable of a chat bubble with three dots, used as a typing indicator icon in the custom leading view.Create a
leading_view.xml custom layout file to inflate in setLeadingView():
What this does: Defines a custom layout with aInflate the XML and initialize the views using the conversation objects inCometChatAvatarandCometChatStatusIndicatorfor the normal state, and a hiddenImageViewfor the typing indicator icon. The layout switches between the two based on typing state.
setLeadingView:
- Java
- Kotlin
What this does: Implements a custom leading view that shows a typing indicator icon (chat dots) when the other user is typing, and an avatar with online/offline status indicator otherwise. ACometChat.MessageListenertracks typing state in aHashMap, and thebindViewmethod switches between the icon and avatar based on that state.
setTitleView
Overrides the default title view in the conversation list with a custom layout.
- Java
- Kotlin
What this does: Registers aConversationsViewHolderListenerthat provides a custom view for the title area of each conversation item.createViewinflates your layout, andbindViewpopulates it with conversation data.

custom_title_view.xml custom layout file to inflate in setTitleView():
What this does: Defines a custom title view layout with an avatar, status indicator, and a hidden typing indicator icon.Inflate the XML and initialize the views using the conversation objects in
setTitleView:
- Java
- Kotlin
What this does: Inflates a custom title view layout and populates it with the conversation name and user status message. If the conversation is a user conversation, the status message is shown; if it is a group conversation, the status is hidden.
setTrailingView
Customizes the trailing (end) view of a conversation item, used for action buttons or additional information such as time-since-last-message badges.
Create a custom_tail_view.xml custom layout file to inflate in setTrailingView():
What this does: Defines a custom trailing view layout with aInflate the XML and initialize the views using the conversation objects inMaterialCardViewcontaining twoTextViewelements for displaying the time value and unit (e.g., “5” and “Min ago”).
setTrailingView:
- Java
- Kotlin
What this does: Inflates a custom trailing view that displays a color-coded time badge showing how long ago the conversation was last updated. Messages within the last hour show purple (“Min ago”), messages within 10 hours show amber (“Hr ago”), and older messages show red (“Hr ago”).

setItemView
Assigns a completely custom list item design to the Conversations component, replacing the default layout entirely.
- Java
- Kotlin
What this does: Registers aConversationsViewHolderListenerthat replaces the entire default conversation list item layout.createViewinflates your custom layout, andbindViewpopulates it with conversation data.

item_converation_list.xml custom layout file to inflate in setListItemView():
What this does: Defines a custom list item layout with a CometChatAvatar, status indicator, conversation name, and date — providing a compact, single-line conversation item design.
Inflate the XML and initialize the views using the conversation objects in setItemView:
- Java
- Kotlin
YourActivity.java
What this does: Inflates a custom list item layout and populates it with the conversation avatar, name, and formatted date. The avatar uses the default CometChatAvatarStyle and the date is formatted as “hh:mm a” (e.g., “02:30 PM”).
setTextFormatters
Defines and applies text formatters that dynamically modify or transform message content before rendering it in the UI. See the MentionsFormatter Guide for more details.

themes.xml
What this does: Defines a custom mentions style where other-user mentions appear in pink (#D6409F) and self-mentions appear in green (#30A46C), both using the body-regular text appearance.
- Java
- Kotlin
What this does: Creates a CometChatMentionsFormatter, applies the custom mentions style, adds it to a list of text formatters, and passes that list to the conversations component. Mentions in conversation subtitles render with the custom colors.
setOverflowMenu
Customizes the overflow menu within the Conversations component. This menu appears as a three-dot or hamburger icon and provides additional options.
- Java
- Kotlin
What this does: Sets a custom View as the overflow menu in the conversations toolbar. Pass any view (e.g., an avatar, icon button) to replace the default overflow menu.

view_menu.xml custom view file to inflate and pass to setOverflowMenu:
user_profile_popup_menu_layout.xml
What this does: Defines a popup menu layout with options for creating a conversation, viewing the user profile, logging out, and displaying the app version.Inflate the view and pass it to
setOverflowMenu. Get child view references to handle click actions:
- Java
- Kotlin
What this does: Creates a complete overflow menu implementation. An avatar of the logged-in user is set as the overflow menu view. When tapped, it shows a popup window with options for creating a conversation, viewing the user profile, logging out, and displaying the app version. Each option dismisses the popup when clicked.
setDateFormat
Customizes the date format used for displaying timestamps in conversations.
- Java
- Kotlin
What this does: Sets a custom SimpleDateFormat for conversation timestamps. Pass a format pattern such as “dd/MM/yyyy HH:mm”, “MMM dd, yyyy”, or “hh:mm a”.

- Java
- Kotlin
What this does: Sets the conversation date format to “dd MMM, hh:mm a” (e.g., “10 Jul, 02:30 PM”) using the device’s default locale.
setSubtitleView
Customizes the subtitle view of each conversation item. The subtitle displays additional information below the conversation title, such as the last message or typing indicators.
- Java
- Kotlin
What this does: Registers a custom subtitle view for conversation items. OverridecreateViewandbindViewin theConversationsViewHolderListenerto provide your custom subtitle layout and data binding.

- Java
- Kotlin
YourActivity.java
What this does: Replaces the default subtitle with a custom TextView that shows “Last Active at:” followed by the conversation’s last update timestamp formatted as “dd/mm/yyyy, HH:MM:SS” in black text.
- Verify: After setting any advanced view, confirm the custom view renders in the correct position within the conversation list item, and the data binding populates correctly for each conversation.
Customization matrix
| What you want to change | Where | Property/API | Example |
|---|---|---|---|
| Avatar style (corner radius, background) | themes.xml | CometChatConversationsStyle with cometchatConversationsAvatarStyle | <item name="cometchatAvatarStrokeRadius">8dp</item> |
| Badge count style (background, text color) | themes.xml | CometChatConversationsStyle with cometchatConversationsBadgeStyle | <item name="cometchatBadgeBackgroundColor">#F76808</item> |
| Apply a custom style | Activity/Fragment | setStyle(int styleRes) | cometChatConversations.setStyle(R.style.CustomConversationsStyle); |
| Back button visibility | Activity/Fragment | setBackIconVisibility(int) | .setBackIconVisibility(View.VISIBLE); |
| Toolbar visibility | Activity/Fragment | setToolbarVisibility(int) | .setToolbarVisibility(View.GONE); |
| Loading state visibility | Activity/Fragment | setLoadingStateVisibility(int) | .setLoadingStateVisibility(View.GONE); |
| Delete option visibility on long press | Activity/Fragment | setDeleteConversationOptionVisibility(int) | .setDeleteConversationOptionVisibility(View.GONE); |
| Error state visibility | Activity/Fragment | setErrorStateVisibility(int) | .setErrorStateVisibility(View.GONE); |
| Empty state visibility | Activity/Fragment | setEmptyStateVisibility(int) | .setEmptyStateVisibility(View.GONE); |
| Separator visibility | Activity/Fragment | setSeparatorVisibility(int) | .setSeparatorVisibility(View.GONE); |
| User online status visibility | Activity/Fragment | setUsersStatusVisibility(int) | .setUsersStatusVisibility(View.GONE); |
| Group type indicator visibility | Activity/Fragment | setGroupTypeVisibility(int) | .setGroupTypeVisibility(View.GONE); |
| Read/delivered receipts visibility | Activity/Fragment | setReceiptsVisibility(int) | .setReceiptsVisibility(View.GONE); |
| Incoming message sound | Activity/Fragment | disableSoundForMessages(boolean) | .disableSoundForMessages(true); |
| Custom message sound | Activity/Fragment | setCustomSoundForMessages(int) | .setCustomSoundForMessages(com.cometchat.chatuikit.R.raw.cometchat_beep2); |
| Selection mode (single/multiple) | Activity/Fragment | setSelectionMode(SelectionMode) | .setSelectionMode(UIKitConstants.SelectionMode.MULTIPLE); |
| Date/time formatting | Activity/Fragment | setDateTimeFormatter(DateTimeFormatterCallback) | See setDateTimeFormatter code above |
| Date pattern | Activity/Fragment | setDatePattern(SimpleDateFormat) | cometchatConversations.setDatePattern(new SimpleDateFormat("dd MMM, hh:mm a", Locale.getDefault())); |
| Long-press options (replace) | Activity/Fragment | setOptions(Function2) | See setOptions code above |
| Long-press options (append) | Activity/Fragment | addOptions(Function2) | See addOptions code above |
| Loading view | Activity/Fragment | setLoadingView(int) | cometchatConversations.setLoadingView(R.layout.your_loading_view); |
| Empty view | Activity/Fragment | setEmptyView(int) | cometchatConversations.setEmptyView(R.layout.your_empty_view); |
| Error view | Activity/Fragment | setErrorView(int) | cometchatConversations.setErrorView(R.layout.your_empty_view); |
| Leading view (avatar area) | Activity/Fragment | setLeadingView(ConversationsViewHolderListener) | See setLeadingView code above |
| Title view | Activity/Fragment | setTitleView(ConversationsViewHolderListener) | See setTitleView code above |
| Trailing view | Activity/Fragment | setTrailingView(ConversationsViewHolderListener) | See setTrailingView code above |
| Entire list item | Activity/Fragment | setItemView(ConversationsViewHolderListener) | See setItemView code above |
| Subtitle view | Activity/Fragment | setSubtitleView(ConversationsViewHolderListener) | See setSubtitleView code above |
| Text formatters (mentions) | Activity/Fragment | setTextFormatters(List<CometChatTextFormatter>) | See setTextFormatters code above |
| Overflow menu | Activity/Fragment | setOverflowMenu(View) | cometChatConversations.setOverflowMenu(View v); |
| Filter conversations | Activity/Fragment | setConversationsRequestBuilder(ConversationsRequestBuilder) | See Filters code above |
Common pitfalls & fixes
| Pitfall | Fix |
|---|---|
| Component does not render | Ensure CometChatUIKit.init() is called and awaited before using any UI Kit component. If init() has not completed, the component will not load data. |
| Conversation list is empty despite having conversations | Verify that a user is logged in with CometChatUIKit.login() before displaying the component. The component fetches conversations for the logged-in user only. |
| Filters not applied | Ensure you call setConversationsRequestBuilder(builder) on the CometChatConversations instance after creating and configuring the builder. |
| Custom style not visible | Verify the style parent is CometChatConversationsStyle and that you call setStyle(R.style.YourStyle) on the component instance. |
setOnItemClick not firing | If you set setSelectionMode to MULTIPLE, item clicks may be consumed by the selection logic. Set the selection mode to NONE if you need standard click behavior. |
| Event listener not receiving events | Ensure you call CometChatConversationEvents.addListener with a unique tag. If you use the same tag as another listener, the previous one is replaced. |
| Typing indicator not showing in custom leading view | Ensure you add a CometChat.MessageListener to track typing events and update the typingIndicatorHashMap before calling setLeadingView. |
Custom view returns null in createView | If createView returns null, the default view is used. Return a valid inflated View to replace the default. |
Sound still plays after disableSoundForMessages(true) | Ensure you call disableSoundForMessages(true) before the component starts loading. If called after data is already loaded, it may not take effect for existing notifications. |
| Delete option still visible after hiding | Ensure you call setDeleteConversationOptionVisibility(View.GONE) on the correct CometChatConversations instance. |
FAQ
Q: How do I show only user conversations (no groups)? A: Create aConversationsRequest.ConversationsRequestBuilder, call setConversationType(CometChatConstants.CONVERSATION_TYPE_USER), and pass it to setConversationsRequestBuilder.
Q: Can I use CometChatConversations in both an Activity and a Fragment?
A: Yes. In an Activity, call setContentView(new CometChatConversations(this)). In a Fragment, return new CometChatConversations(getContext()) from onCreateView.
Q: How do I listen for conversation deletion events outside the component?
A: Use CometChatConversationEvents.addListener("YOUR_TAG", ...) and override ccConversationDeleted. Call CometChatConversationEvents.removeListener("YOUR_TAG") to unsubscribe.
Q: How do I customize the avatar and badge styles?
A: Define custom styles with parents CometChatAvatarStyle and CometChatBadgeStyle in themes.xml, reference them in a CometChatConversationsStyle, and apply with setStyle().
Q: How do I add custom long-press options without removing the defaults?
A: Use addOptions instead of setOptions. addOptions appends your custom MenuItem objects to the existing default options.