Skip to main content

Introduction

The CometChat V5 Android UI Kit was a single Java module (com.cometchat:chat-uikit-android) that shipped all UI components, ViewModels, and resources in one artifact under the com.cometchat.chatuikit package. V6 splits the UI Kit into three modules built entirely in Kotlin:
ModuleArtifactDescription
Corecom.cometchat:chatuikit-coreShared ViewModels, Repositories, DataSources, and events — used by both UI modules.
Kotlin (XML Views)com.cometchat:chat-uikit-kotlinTraditional XML-based Views for Activities and Fragments.
Jetpack Composecom.cometchat:chat-uikit-composeDeclarative Compose components.
Choose the UI module that fits your project — both depend on chatuikit-core automatically.

Key Migration Changes

The following table summarizes the most impactful changes when migrating from V5 to V6:
AreaV5V6
LanguageJavaKotlin
ModulesSingle com.cometchat:chat-uikit-androidcom.cometchat:chat-uikit-kotlin (XML) or com.cometchat:chat-uikit-compose (Compose) + shared chatuikit-core
Import pathcom.cometchat.chatuikit.*com.cometchat.uikit.kotlin.presentation.* or com.cometchat.uikit.compose.presentation.*
CometChatUIKit importcom.cometchat.chatuikit.shared.cometchatuikit.CometChatUIKitcom.cometchat.uikit.core.CometChatUIKit
UIKitSettings importcom.cometchat.chatuikit.shared.cometchatuikit.UIKitSettingscom.cometchat.uikit.core.UIKitSettings
State managementLiveDataStateFlow / Kotlin coroutines
ArchitectureView + ViewModel + Adapter (2-layer)View → ViewModel → Repository → DataSource (4-layer Clean Architecture)
Conversation listCometChatConversationsCometChatConversations
Thread headerCometChatThreadedMessagesHeaderCometChatThreadHeader
EventsCometChat*Events.addListener() / removeListener()CometChatEvents singleton with SharedFlow — collect in a coroutine scope
ThemingPalette + Typography objectsXML theme attributes extending CometChatTheme.DayNight (Kotlin XML) or CometChatTheme {} composable (Compose)
StylingsetStyle(ComponentStyle) methods with style objectsXML @StyleRes theme attributes (Kotlin XML) or style data classes with .default().copy() (Compose)
View slotsConversationsViewHolderListener with createView/bindView (Java)Same pattern in Kotlin XML or @Composable lambdas in Compose
ViewModel accessgetViewModel() returns Java ViewModel with LiveDatagetViewModel() / setViewModel() with Kotlin ViewModel using StateFlow
List operationsDirect list manipulation via adapterListOperations<T> interface with addItem, removeItem, updateItem, moveItemToTop, batch {}
RepositoryNot exposedSwappable via Factory pattern — implement interface, inject via *ViewModelFactory
Min SDK2428

Dependency Changes

V5 (before)

build.gradle
dependencies {
    implementation 'com.cometchat:chat-uikit-android:5.x.x'
}

V6 — Kotlin XML Views (after)

build.gradle
dependencies {
    implementation 'com.cometchat:chat-uikit-kotlin:6.x.x'
    // chatuikit-core is pulled in transitively
}

V6 — Jetpack Compose (after)

build.gradle
dependencies {
    implementation 'com.cometchat:chat-uikit-compose:6.x.x'
    // chatuikit-core is pulled in transitively
}
V6 raises the minimum SDK from 24 to 28. Update minSdk in your build.gradle accordingly.

Component Renames

Most components keep the same class name but move to a new package. The following were also renamed:
V5 NameV6 Name
CometChatConversationsCometChatConversations
CometChatThreadedMessagesHeaderCometChatThreadHeader
All other components (CometChatUsers, CometChatGroups, CometChatMessageHeader, CometChatMessageList, CometChatMessageComposer, CometChatIncomingCall, CometChatOutgoingCall, CometChatCallButtons, CometChatCallLogs, CometChatGroupMembers) retain their names but live under the new V6 package paths.

Import Path Changes

CometChatUIKit & UIKitSettings

V5 (Java)
import com.cometchat.chatuikit.shared.cometchatuikit.CometChatUIKit;
import com.cometchat.chatuikit.shared.cometchatuikit.UIKitSettings;
V6 (Kotlin)
import com.cometchat.uikit.core.CometChatUIKit
import com.cometchat.uikit.core.UIKitSettings

UI Components

V5 (Java)
import com.cometchat.chatuikit.conversations.CometChatConversations;
import com.cometchat.chatuikit.users.CometChatUsers;
import com.cometchat.chatuikit.groups.CometChatGroups;
import com.cometchat.chatuikit.messageheader.CometChatMessageHeader;
import com.cometchat.chatuikit.messagelist.CometChatMessageList;
import com.cometchat.chatuikit.messagecomposer.CometChatMessageComposer;
V6 — Kotlin XML
import com.cometchat.uikit.kotlin.presentation.conversations.ui.CometChatConversations
import com.cometchat.uikit.kotlin.presentation.users.ui.CometChatUsers
import com.cometchat.uikit.kotlin.presentation.groups.ui.CometChatGroups
import com.cometchat.uikit.kotlin.presentation.messageheader.ui.CometChatMessageHeader
import com.cometchat.uikit.kotlin.presentation.messagelist.ui.CometChatMessageList
import com.cometchat.uikit.kotlin.presentation.messagecomposer.ui.CometChatMessageComposer
V6 — Jetpack Compose
import com.cometchat.uikit.compose.presentation.conversations.ui.CometChatConversations
import com.cometchat.uikit.compose.presentation.users.ui.CometChatUsers
import com.cometchat.uikit.compose.presentation.groups.ui.CometChatGroups
import com.cometchat.uikit.compose.presentation.messageheader.ui.CometChatMessageHeader
import com.cometchat.uikit.compose.presentation.messagelist.ui.CometChatMessageList
import com.cometchat.uikit.compose.presentation.messagecomposer.ui.CometChatMessageComposer

Events Migration

In V5, events used the addListener / removeListener pattern with unique string IDs:
V5 (Java)
CometChatMessageEvents.addListener("unique-id", new CometChatMessageEvents() {
    @Override
    public void onMessageSent(BaseMessage message) {
        // Handle message sent
    }
});
// Cleanup
CometChatMessageEvents.removeListener("unique-id");
In V6, events use the CometChatEvents singleton with Kotlin SharedFlow. Collect in a coroutine scope:
V6 (Kotlin)
lifecycleScope.launch {
    CometChatEvents.messageEvents.collect { event ->
        when (event) {
            is MessageEvent.Sent -> { /* Handle message sent */ }
            is MessageEvent.Edited -> { /* Handle message edited */ }
            is MessageEvent.Deleted -> { /* Handle message deleted */ }
        }
    }
}
// No manual cleanup needed — lifecycleScope auto-cancels

State Management Migration

V5 — LiveData observers (Java)

V5
conversationsViewModel.getConversationList().observe(this, new Observer<List<Conversation>>() {
    @Override
    public void onChanged(List<Conversation> conversations) {
        // Update UI with conversations
    }
});

V6 — StateFlow collectors (Kotlin)

V6
lifecycleScope.launch {
    conversationsViewModel.uiState.collect { state ->
        when (state) {
            is UIState.Loading -> { /* Show loading */ }
            is UIState.Success -> { /* Update UI with state.data */ }
            is UIState.Error -> { /* Show error */ }
        }
    }
}

Styling Migration

V5 — Style objects (Java)

V5
ConversationsStyle style = new ConversationsStyle();
style.setBackground(Color.WHITE);
style.setTitleColor(Color.BLACK);
style.setBorderWidth(1);
style.setBorderColor(Color.GRAY);
cometChatConversations.setStyle(style);

V6 — Kotlin XML: Theme attributes in themes.xml

V6 — themes.xml
<resources>
    <style name="AppTheme" parent="CometChatTheme.DayNight">
        <item name="cometchatPrimaryColor">#F76808</item>
        <item name="cometchatBackgroundColor">#FFFFFF</item>
        <item name="cometchatTextPrimaryColor">#141414</item>
        <item name="android:fontFamily">@font/your_custom_font</item>
    </style>

    <!-- Override a specific component style -->
    <style name="CustomConversationsStyle" parent="CometChatConversations">
        <item name="cometchatSeparatorColor">#E0E0E0</item>
        <item name="cometchatItemBackgroundColor">#FAFAFA</item>
    </style>
</resources>

V6 — Jetpack Compose: Style data classes

V6 — Compose
CometChatConversations(
    style = CometChatConversationsStyle.default().copy(
        backgroundColor = Color.White,
        titleColor = Color.Black,
        separatorColor = Color.LightGray
    )
)

Component-by-Component Migration

Conversations

V5 — CometChatConversations (Java)
CometChatConversations conversations = findViewById(R.id.conversations);
conversations.setOnItemClick(new OnItemClick<Conversation>() {
    @Override
    public void onItemClick(Conversation conversation, int position) {
        // Handle click
    }
});
V6 — CometChatConversations (Kotlin)
val conversations = findViewById<CometChatConversations>(R.id.conversations)
conversations.setOnItemClick { conversation ->
    // Handle click
}

Users

V5 — CometChatUsers (Java)
CometChatUsers users = findViewById(R.id.users);
users.setOnItemClick(new OnItemClick<User>() {
    @Override
    public void onItemClick(User user, int position) {
        // Handle click
    }
});
V6 — CometChatUsers (Kotlin)
val users = findViewById<CometChatUsers>(R.id.users)
users.setOnItemClick { user ->
    // Handle click
}

Groups

V5 — CometChatGroups (Java)
CometChatGroups groups = findViewById(R.id.groups);
groups.setOnItemClick(new OnItemClick<Group>() {
    @Override
    public void onItemClick(Group group, int position) {
        // Handle click
    }
});
V6 — CometChatGroups (Kotlin)
val groups = findViewById<CometChatGroups>(R.id.groups)
groups.setOnItemClick { group ->
    // Handle click
}

Message Header

V5 — CometChatMessageHeader (Java)
CometChatMessageHeader header = findViewById(R.id.messageHeader);
header.setOnBackButtonPressed(new OnBackPress() {
    @Override
    public void onBack() {
        // Handle back
    }
});
V6 — CometChatMessageHeader (Kotlin)
val header = findViewById<CometChatMessageHeader>(R.id.messageHeader)
header.setOnBackPress {
    // Handle back
}

Message List

V5 — CometChatMessageList (Java)
CometChatMessageList messageList = findViewById(R.id.messageList);
messageList.setOnThreadRepliesClick(new OnThreadRepliesClick() {
    @Override
    public void onThreadRepliesClick(Context context, BaseMessage message, CometChatMessageTemplate template) {
        // Handle thread click
    }
});
V6 — CometChatMessageList (Kotlin)
val messageList = findViewById<CometChatMessageList>(R.id.messageList)
messageList.setOnThreadRepliesClick { context, message, template ->
    // Handle thread click
}

Message Composer

V5 — CometChatMessageComposer (Java)
CometChatMessageComposer composer = findViewById(R.id.messageComposer);
composer.setOnSendButtonClick(new OnSendButtonClick() {
    @Override
    public void onSendButtonClick(Context context, BaseMessage message) {
        // Handle send
    }
});
V6 — CometChatMessageComposer (Kotlin)
val composer = findViewById<CometChatMessageComposer>(R.id.messageComposer)
composer.setOnSendButtonClick { context, message ->
    // Handle send
}

Call Components

Call components (CometChatIncomingCall, CometChatOutgoingCall, CometChatCallButtons, CometChatCallLogs) keep the same class names in V6. Update the import paths:
V5 (Java)
import com.cometchat.chatuikit.calls.incoming.CometChatIncomingCall;
import com.cometchat.chatuikit.calls.outgoing.CometChatOutgoingCall;
import com.cometchat.chatuikit.calls.callbuttons.CometChatCallButtons;
import com.cometchat.chatuikit.calls.calllogs.CometChatCallLogs;
V6 — Kotlin XML
import com.cometchat.uikit.kotlin.presentation.incomingcall.CometChatIncomingCall
import com.cometchat.uikit.kotlin.presentation.outgoingcall.CometChatOutgoingCall
import com.cometchat.uikit.kotlin.presentation.callbuttons.CometChatCallButtons
import com.cometchat.uikit.kotlin.presentation.calllogs.ui.CometChatCallLogs

Architecture Changes

V6 introduces a 4-layer Clean Architecture that replaces V5’s 2-layer View + ViewModel pattern:
View → ViewModel → Repository → DataSource

ViewModel Access

V5 (Java)
// V5 — Java ViewModel with LiveData
ConversationsViewModel viewModel = cometChatConversations.getViewModel();
viewModel.getConversationList().observe(this, conversations -> {
    // React to data
});
V6 (Kotlin)
// V6 — Kotlin ViewModel with StateFlow
val viewModel = conversations.getViewModel()
lifecycleScope.launch {
    viewModel.uiState.collect { state ->
        // React to data
    }
}

// You can also inject a custom ViewModel
conversations.setViewModel(myCustomViewModel)

List Operations

V5 required direct adapter manipulation. V6 provides a ListOperations<T> interface:
V6 — ListOperations
val viewModel = conversations.getViewModel()

// Single operations
viewModel.addItem(conversation)
viewModel.removeItem(conversation)
viewModel.updateItem(conversation)
viewModel.moveItemToTop(conversation)

// Batch operations
viewModel.batch {
    addItem(conversation1)
    updateItem(conversation2)
    removeItem(conversation3)
}

Custom Repository

V6 exposes the repository layer, allowing you to swap data sources:
V6 — Custom Repository
// Implement the repository interface
class MyConversationRepository : ConversationsRepository {
    override suspend fun fetchConversations(): List<Conversation> {
        // Your custom data source
    }
}

// Inject via ViewModelFactory
val factory = CometChatConversationsViewModelFactory(
    repository = MyConversationRepository()
)
conversations.setViewModelFactory(factory)

Property Changes

Below is a detailed reference of new, updated, and removed properties across all UI Kit components in the V5-to-V6 migration.

Conversations (now CometChatConversations)

New Properties

NameTypeDescription
dateTimeFormatterDateTimeFormatterCallbackCallback for custom date/time formatting in conversations
toolbarVisibilityintControls visibility of the toolbar in conversations view
deleteConversationOptionVisibilityintControls visibility of delete conversation option
backIconVisibilityintControls visibility of back icon in toolbar
userStatusVisibilityintControls visibility of user status indicators
groupTypeVisibilityintControls visibility of group type indicators
receiptsVisibilityintControls visibility of read receipts
errorStateVisibilityintControls visibility of error state view
loadingStateVisibilityintControls visibility of loading state view
emptyStateVisibilityintControls visibility of empty state view
separatorHeight@Dimension intHeight of separator between conversation items
separatorColor@ColorInt intColor of separator between conversation items
separatorVisibilityintControls visibility of separator
deleteOptionIconDrawableIcon for delete option in popup menu
deleteOptionIconTint@ColorInt intTint color for delete option icon
deleteOptionTextColor@ColorInt intText color for delete option
deleteOptionTextAppearance@StyleRes intText appearance for delete option
discardSelectionIconDrawableIcon for discarding selection
discardSelectionIconTint@ColorInt intTint color for discard selection icon
submitSelectionIconDrawableIcon for submitting selection
submitSelectionIconTint@ColorInt intTint color for submit selection icon
checkBoxStrokeWidth@Dimension intStroke width for selection checkboxes
checkBoxCornerRadius@Dimension intCorner radius for selection checkboxes
checkBoxStrokeColor@ColorInt intStroke color for selection checkboxes
checkBoxBackgroundColor@ColorInt intBackground color for selection checkboxes
checkBoxCheckedBackgroundColor@ColorInt intBackground color for checked checkboxes
checkBoxSelectIconDrawableIcon for selected checkboxes
checkBoxSelectIconTint@ColorInt intTint color for checkbox select icon
itemSelectedBackgroundColor@ColorInt intBackground color for selected items
itemBackgroundColor@ColorInt intBackground color for conversation items
optionListStyle@StyleRes intStyle for popup menu options
mentionsStyle@StyleRes intStyle for mentions in conversations
typingIndicatorStyle@StyleRes intStyle for typing indicators
receiptStyle@StyleRes intStyle for message receipts
badgeStyle@StyleRes intStyle for conversation badges
dateStyle@StyleRes intStyle for conversation dates
statusIndicatorStyle@StyleRes intStyle for status indicators
avatarStyle@StyleRes intStyle for conversation avatars
emptyView@LayoutRes intLayout resource for empty state
errorView@LayoutRes intLayout resource for error state
loadingView@LayoutRes intLayout resource for loading state
additionParameterAdditionParameterAdditional parameters for conversations
onBackPressOnBackPressCallback for back button press
addOptionsFunction2< Context, Conversation, List< CometChatPopupMenu.MenuItem >>Function to add options to popup menu
optionsFunction2< Context, Conversation, List< CometChatPopupMenu.MenuItem >>Function to replace popup menu options
overflowMenuViewCustom overflow menu view
onLoadOnLoad< Conversation >Callback when conversations are loaded
onEmptyOnEmptyCallback when conversation list is empty
onSelectionOnSelection< Conversation >Callback for conversation selection
onItemClickOnItemClick< Conversation >Callback for conversation item clicks
onItemLongClickOnItemLongClick< Conversation >Callback for conversation item long clicks

Renamed Properties

V5 NameV6 NameTypeDescription
setItemClickListenersetOnItemClickMethodSets click listener for conversation items
setOnSelectionsetOnSelectMethodSets selection listener for conversations
setSubtitlesetSubtitleViewMethodSets custom subtitle view
setTailViewsetTrailingViewMethodSets custom trailing view
setListItemViewsetItemViewMethodSets custom item view
setDatePatternsetDateTimeFormatterMethodSets date formatting for conversations

Removed Properties

NameTypeDescription
hideErrorbooleanFlag to hide error messages
errorTextStringCustom error message text
errorStateTextAppearanceintText appearance for error state
errorMessageColorintColor for error messages
palettePaletteColor palette instance
typographyTypographyTypography instance
swipeHelperRecyclerViewSwipeListenerSwipe gesture helper
progressDialogProgressDialogProgress dialog for operations
conversationTempConversationTemporary conversation reference
loadingIconImageViewLoading icon view
disableMentionsbooleanFlag to disable mentions
cometChatMentionsFormatterCometChatMentionsFormatterMentions formatter instance
setStyle(ConversationsStyle)MethodSets conversation style using ConversationsStyle object
emptyStateTextMethodSets empty state text
emptyStateTextColorMethodSets empty state text color
emptyStateTextFontMethodSets empty state text font
emptyStateTextAppearanceMethodSets empty state text appearance
errorStateTextAppearanceMethodSets error state text appearance
errorStateTextColorMethodSets error state text color
errorStateTextMethodSets error state text
setEmptyStateViewMethodSets empty state view
setErrorStateViewMethodSets error state view
setLoadingStateViewMethodSets loading state view
setLoadingIconTintColorMethodSets loading icon tint
disableUsersPresenceMethodDisables user presence
disableReceiptMethodDisables receipts
hideReceiptMethodHides receipts
disableTypingMethodDisables typing indicators
setProtectedGroupIconMethodSets protected group icon
setPrivateGroupIconMethodSets private group icon
setReadIconMethodSets read status icon
setDeliveredIconMethodSets delivered status icon
setSentIconMethodSets sent status icon
hideSeparatorMethodHides item separators

Users

New Properties

NameTypeDescription
toolbarVisibilityintControls visibility of the toolbar in users view
loadingStateVisibilityintControls visibility of loading state view
searchBoxVisibilityintControls visibility of search box
backIconVisibilityintControls visibility of back icon in toolbar
stickyHeaderVisibilityintControls visibility of sticky header
emptyStateVisibilityintControls visibility of empty state view
errorStateVisibilityintControls visibility of error state view
separatorVisibilityintControls visibility of separator between items
titleVisibilityintControls visibility of title
userStatusVisibilityintControls visibility of user status indicators
showShimmerbooleanFlag to control shimmer loading animation
isUserListEmptybooleanFlag indicating if user list is empty
isFurtherSelectionEnabledbooleanFlag to control further selection capability
searchPlaceholderTextStringPlaceholder text for search input
customLoadingViewViewCustom view for loading state
overflowMenuViewCustom overflow menu view
onLoadOnLoad< User >Callback when users are loaded
onEmptyOnEmptyCallback when user list is empty
onBackPressOnBackPressCallback for back button press
backgroundColor@ColorInt intBackground color for the view
titleTextColor@ColorInt intText color for title
titleTextAppearance@StyleRes intText appearance for title
strokeWidth@Dimension intStroke width for card border
strokeColor@ColorInt intStroke color for card border
cornerRadius@Dimension intCorner radius for card
backIconDrawableBack icon drawable
backIconTint@ColorInt intTint color for back icon
separatorColor@ColorInt intColor of separator between items
discardSelectionIconDrawableIcon for discarding selection
discardSelectionIconTint@ColorInt intTint color for discard selection icon
submitSelectionIconDrawableIcon for submitting selection
submitSelectionIconTint@ColorInt intTint color for submit selection icon
searchInputEndIconDrawableEnd icon for search input
searchInputEndIconTint@ColorInt intTint color for search input end icon
searchInputStrokeWidth@Dimension intStroke width for search input
searchInputStrokeColor@ColorInt intStroke color for search input
searchInputCornerRadius@Dimension intCorner radius for search input
searchInputBackgroundColor@ColorInt intBackground color for search input
searchInputTextAppearance@StyleRes intText appearance for search input
searchInputTextColor@ColorInt intText color for search input
searchInputPlaceHolderTextAppearance@StyleRes intPlaceholder text appearance for search input
searchInputPlaceHolderTextColor@ColorInt intPlaceholder text color for search input
searchInputIconTint@ColorInt intTint color for search input icon
searchInputIconDrawableIcon for search input
stickyTitleColor@ColorInt intColor for sticky title
stickyTitleAppearance@StyleRes intText appearance for sticky title
stickyTitleBackgroundColor@ColorInt intBackground color for sticky title
avatar@StyleRes intStyle resource for avatar
itemTitleTextAppearance@StyleRes intText appearance for item title
itemTitleTextColor@ColorInt intText color for item title
itemBackgroundColor@ColorInt intBackground color for items
statusIndicatorStyle@StyleRes intStyle for status indicators
itemSelectedBackgroundColor@ColorInt intBackground color for selected items
checkBoxStrokeWidth@Dimension intStroke width for selection checkboxes
checkBoxCornerRadius@Dimension intCorner radius for selection checkboxes
checkBoxStrokeColor@ColorInt intStroke color for selection checkboxes
checkBoxBackgroundColor@ColorInt intBackground color for selection checkboxes
checkBoxCheckedBackgroundColor@ColorInt intBackground color for checked checkboxes
checkBoxSelectIconTint@ColorInt intTint color for checkbox select icon
checkBoxSelectIconDrawableIcon for selected checkboxes
emptyStateTextAppearance@StyleRes intText appearance for empty state
emptyStateTextColor@ColorInt intText color for empty state
emptyStateSubTitleTextAppearance@StyleRes intSubtitle text appearance for empty state
emptyStateSubtitleTextColor@ColorInt intSubtitle text color for empty state
errorStateTextAppearance@StyleRes intText appearance for error state
errorStateTextColor@ColorInt intText color for error state
errorStateSubtitleTextAppearance@StyleRes intSubtitle text appearance for error state
errorStateSubtitleColor@ColorInt intSubtitle text color for error state
retryButtonTextColor@ColorInt intText color for retry button
retryButtonTextAppearance@StyleRes intText appearance for retry button
retryButtonBackgroundColor@ColorInt intBackground color for retry button
retryButtonStrokeColor@ColorInt intStroke color for retry button
retryButtonStrokeWidth@Dimension intStroke width for retry button
retryButtonCornerRadius@Dimension intCorner radius for retry button
emptyViewId@LayoutRes intLayout resource for empty view
errorViewId@LayoutRes intLayout resource for error view
loadingViewId@LayoutRes intLayout resource for loading view
submitSelectionIconVisibilityintControls visibility of submit selection icon
addOptionsFunction2< Context, User, List< CometChatPopupMenu.MenuItem >>Function to add options to popup menu
optionsFunction2< Context, User, List< CometChatPopupMenu.MenuItem >>Function to replace popup menu options
cometchatPopUpMenuCometChatPopupMenuPopup menu for user actions

Renamed Properties

V5 NameV6 NameTypeDescription
setItemClickListenersetOnItemClickMethodSets click listener for user items
setOnSelectionsetOnSelectMethodSets selection listener for users
setSubtitlesetSubtitleViewMethodSets custom subtitle view
setTailsetTailViewMethodSets custom tail view (renamed to setTrailingView)
setListItemViewsetItemViewMethodSets custom item view
getConversationsAdaptergetUsersAdapterMethodGets the users adapter

Removed Properties

NameTypeDescription
hideErrorbooleanFlag to hide error messages
emptyStateTextTextViewTextView for empty state message
errorStateTextAppearanceintText appearance for error state
errorMessageColorintColor for error messages
errorTextStringCustom error message text
palettePaletteColor palette instance
typographyTypographyTypography instance
swipeHelperRecyclerViewSwipeListenerSwipe gesture helper
loadingIconImageViewLoading icon view
submitIcon@DrawableRes intSubmit icon resource
iconImageViewIcon view for submit
setStyle(UsersStyle)MethodSets users style using UsersStyle object
emptyStateText(String)MethodSets empty state text
emptyStateTextColor(int)MethodSets empty state text color
emptyStateTextFont(String)MethodSets empty state text font
emptyStateTextAppearance(int)MethodSets empty state text appearance
errorStateTextAppearance(int)MethodSets error state text appearance
errorStateTextColor(int)MethodSets error state text color
errorStateText(String)MethodSets error state text
setEmptyStateView(@LayoutRes int)MethodSets empty state view layout
setLoadingIconTintColor(@ColorInt int)MethodSets loading icon tint color
setErrorStateView(@LayoutRes int)MethodSets error state view layout
setLoadingStateView(@LayoutRes int)MethodSets loading state view layout
setBackground(int[], GradientDrawable.Orientation)MethodSets gradient background
disableUsersPresence(boolean)MethodDisables user presence indicators
setSubmitIcon(@DrawableRes int)MethodSets submit icon
setSelectionIcon(@DrawableRes int)MethodSets selection icon
setFurtherSelectionEnabled(boolean)MethodSets further selection capability
hideError(boolean)MethodHides error messages
hideSeparator(boolean)MethodHides separators (replaced with setStickyHeaderVisibility)

Groups

Renamed Properties

V5 NameV6 NameTypeDescription
setItemClickListenersetOnItemClickMethodSets click listener for group items
setOnSelectionsetOnSelectionMethodSets selection listener for groups (signature changed)
setSubtitlesetSubtitleViewMethodSets custom subtitle view
setTailsetTailViewMethodSets custom tail view (renamed to setTrailingView)
setListItemViewsetItemViewMethodSets custom item view
setPasswordGroupIconN/AMethodMethod for password group icon (removed)

Removed Properties

NameTypeDescription
palettePaletteColor palette instance
typographyTypographyTypography instance
swipeHelperRecyclerViewSwipeListenerSwipe gesture helper
setStyle(GroupsStyle)MethodSets groups style using GroupsStyle object
setOverflowMenuOptionsMethodSets overflow menu options (replaced with setOptions)

GroupMembers

Renamed Properties

V5 NameV6 NameTypeDescription
setItemClickListenersetOnItemClickMethodSets click listener for group member items
setTailViewsetTrailingViewMethodSets custom trailing view
setListItemViewsetItemViewMethodSets custom item view
disableUsersPresencesetUserStatusVisibilityMethodControls user presence visibility

Removed Properties

NameTypeDescription
palettePaletteColor palette instance
typographyTypographyTypography instance
swipeHelperRecyclerViewSwipeListenerSwipe gesture helper
setStyle(GroupMembersStyle)MethodSets group members style using GroupMembersStyle object

MessageHeader

Renamed Properties

V5 NameV6 NameTypeDescription
subtitlesubtitleViewFunction3< Context, User, Group, View >Function to create custom subtitle view
menutrailingViewFunction3< Context, User, Group, View >Function to create custom menu/trailing view
disableUsersPresencesetUserStatusVisibilityMethodControls user presence visibility
setOnBackButtonPressedsetOnBackPressMethodSets back button callback

Removed Properties

NameTypeDescription
palettePaletteColor palette instance
typographyTypographyTypography instance
disableTypingbooleanFlag to disable typing indicator
setStyle(MessageHeaderStyle)MethodSets header style using MessageHeaderStyle object
setAvatarStyle(AvatarStyle)MethodSets avatar style using AvatarStyle object
setListItemStyle(ListItemStyle)MethodSets list item style using ListItemStyle object

MessageList

Renamed Properties

V5 NameV6 NameTypeDescription
setAlignmentsetMessageAlignmentMethodSets alignment of messages
showAvatarsetAvatarVisibilityMethodControls avatar visibility
hideReceiptsetReceiptsVisibilityMethodControls receipt visibility
setDatePatternsetTimeFormatMethodSets time format for messages
setDateSeparatorPatternsetDateFormatMethodSets date format for separators
hideErrorsetErrorStateVisibilityMethodControls error state visibility

Removed Properties

NameTypeDescription
palettePaletteColor palette instance
typographyTypographyTypography instance
cometChatActionSheetCometChatActionSheetAction sheet component (replaced)
setStyle(MessageListStyle)MethodSets style using MessageListStyle object
setAvatarStyle(AvatarStyle)MethodSets avatar style using AvatarStyle object
disableReactions(boolean)MethodDisables reactions (removed)

MessageComposer

Renamed Properties

V5 NameV6 NameTypeDescription
setParentMessageId(int)setParentMessageId(long)MethodSets parent message ID (parameter type changed)
setText(String)setInitialComposerText(String)MethodSets initial composer text
setVoiceRecordingVisibility(int)setVoiceNoteButtonVisibility(int)MethodSets voice note button visibility

Removed Properties

NameTypeDescription
cometChatThemeCometChatThemeTheme instance
liveReactionIcon@DrawableRes intLive reaction icon resource
hideLiveReactionbooleanFlag to hide live reaction
setStyle(MessageComposerStyle)MethodSets style using MessageComposerStyle object

IncomingCall

Renamed Properties

V5 NameV6 NameTypeDescription
onDeclineCallClickonRejectClickOnClickClick listener for decline/reject button
disableSoundForCalldisableSoundForCallsbooleanFlag to disable sound for calls

Removed Properties

NameTypeDescription
cometChatThemeCometChatThemeTheme instance
cometChatCardCometChatCardCard component for displaying call info
setStyle(IncomingCallStyle)MethodSets style using IncomingCallStyle object
setAvatarStyle(AvatarStyle)MethodSets avatar style using AvatarStyle object

OutgoingCall

Renamed Properties

V5 NameV6 NameTypeDescription
onDeclineCallClickonEndCallClickOnClickClick listener for decline/end call button

Removed Properties

NameTypeDescription
cometChatThemeCometChatThemeTheme instance for styling
setStyle(OutgoingCallStyle)MethodSets style using OutgoingCallStyle object
setAvatarStyle(AvatarStyle)MethodSets avatar style using AvatarStyle object

CallButtons

Renamed Properties

V5 NameV6 NameTypeDescription
hideVoiceCall(boolean)setVoiceCallButtonVisibility(int)MethodControls voice call button visibility
hideVideoCall(boolean)setVideoCallButtonVisibility(int)MethodControls video call button visibility
setVoiceCallIcon(@DrawableRes int)setVoiceCallIcon(Drawable)MethodSets voice call icon (parameter type changed)
setVideoCallIcon(@DrawableRes int)setVideoCallIcon(Drawable)MethodSets video call icon (parameter type changed)

Removed Properties

NameTypeDescription
themeCometChatThemeTheme instance for styling
setStyle(CallButtonsStyle)MethodSets style using CallButtonsStyle object
setButtonStyle(ButtonStyle)MethodSets button style using ButtonStyle object

CallLogs

Renamed Properties

V5 NameV6 NameTypeDescription
setOnItemClickListenersetOnItemClickMethodSets item click listener
setOnInfoIconClickListenersetOnCallIconClickListenerMethodSets call icon click listener
setEmptyStateView(@LayoutRes int)setEmptyView(@LayoutRes int)MethodSets empty state view
setErrorStateView(@LayoutRes int)setErrorView(@LayoutRes int)MethodSets error state view
setListItemViewsetItemViewMethodSets item view

Removed Properties

NameTypeDescription
themeCometChatThemeTheme instance
swipeHelperRecyclerViewSwipeListenerSwipe gesture helper
setStyle(CallLogsStyle)MethodSets style using CallLogsStyle object
setAvatarStyle(AvatarStyle)MethodSets avatar style using AvatarStyle object

Next Steps

Getting Started

Fresh V6 setup guide for Android.

Components Overview

Explore all V6 prebuilt UI components.

Theming

XML-based and Compose theming system.

Methods

Init, login, logout, and other UI Kit methods.