CometChatBuilderSettings.kt file handles basic feature toggles. For deeper customizations, modify component props using BuilderSettingsHelper or edit the source code directly.
Understanding the Customization Architecture
The Android UI Kit Builder uses two main files for customization:| File | Purpose | When to Modify |
|---|---|---|
CometChatBuilderSettings.kt | Auto-generated feature flags and configuration constants | Functional changes (enable/disable features) |
themes.xml | Theme styles, colors, and typography | UI/visual changes (colors, fonts, spacing) |
BuilderSettingsHelper.kt | Utility class that applies settings to UI components | Component-level customizations |
CometChatBuilderSettings.kt is auto-generated by the Builder plugin from your cometchat-builder-settings.json file. You can modify the values directly in the Kotlin file, but changes will be overwritten if you rebuild with the plugin.Using BuilderSettingsHelper
TheBuilderSettingsHelper is a utility class that applies your Builder configuration to CometChat UI components. It reads values from CometChatBuilderSettings and configures component properties accordingly.
How It Works
- Import the helper into your Activity or Fragment
- Get a reference to your CometChat UI component
- Call the appropriate method to apply settings
Component-Level Customizations
MessageHeader
TheapplySettingsToMessageHeader method configures call buttons and user status visibility based on your Builder settings.
| Setting | Property | Description |
|---|---|---|
VoiceAndVideoCalling.ONEONONEVOICECALLING | voiceCallButtonVisibility | Shows/hides voice call button for 1:1 chats |
VoiceAndVideoCalling.ONEONONEVIDEOCALLING | videoCallButtonVisibility | Shows/hides video call button for 1:1 chats |
VoiceAndVideoCalling.GROUPVOICECONFERENCE | voiceCallButtonVisibility | Shows/hides voice call button for groups |
VoiceAndVideoCalling.GROUPVIDEOCONFERENCE | videoCallButtonVisibility | Shows/hides video call button for groups |
CoreMessagingExperience.USERANDFRIENDSPRESENCE | userStatusVisibility | Shows/hides online status indicator |
MessageList
TheapplySettingsToMessageList method configures message options, reactions, AI features, and more.
| Setting | Property | Description |
|---|---|---|
CoreMessagingExperience.THREADCONVERSATIONANDREPLIES | replyInThreadOptionVisibility | Shows/hides reply in thread option |
CoreMessagingExperience.EDITMESSAGE | editMessageOptionVisibility | Shows/hides edit message option |
CoreMessagingExperience.DELETEMESSAGE | deleteMessageOptionVisibility | Shows/hides delete message option |
CoreMessagingExperience.MESSAGEDELIVERYANDREADRECEIPTS | receiptsVisibility | Shows/hides read receipts |
CoreMessagingExperience.QUOTEDREPLIES | isSwipeToReplyEnabled, replyOptionVisibility | Enables swipe-to-reply and reply option |
DeeperUserEngagement.REACTIONS | messageReactionOptionVisibility | Shows/hides reaction option |
DeeperUserEngagement.MESSAGETRANSLATION | translateMessageOptionVisibility | Shows/hides translate option |
AiUserCopilot.CONVERSATIONSTARTER | isEnableConversationStarter | Enables AI conversation starters |
AiUserCopilot.SMARTREPLY | isEnableSmartReplies | Enables AI smart replies |
PrivateMessagingWithinGroups.SENDPRIVATEMESSAGETOGROUPMEMBERS | messagePrivatelyOptionVisibility | Shows/hides message privately option |
MessageComposer
TheapplySettingsToMessageComposer method configures attachment options, typing indicators, mentions, and more.
| Setting | Property | Description |
|---|---|---|
CoreMessagingExperience.TYPINGINDICATOR | disableTypingEvents() | Enables/disables typing indicators |
CoreMessagingExperience.PHOTOSSHARING | cameraAttachmentOptionVisibility, imageAttachmentOptionVisibility | Shows/hides photo attachments |
CoreMessagingExperience.VIDEOSHARING | videoAttachmentOptionVisibility | Shows/hides video attachments |
CoreMessagingExperience.AUDIOSHARING | audioAttachmentOptionVisibility | Shows/hides audio attachments |
CoreMessagingExperience.FILESHARING | fileAttachmentOptionVisibility | Shows/hides file attachments |
DeeperUserEngagement.MENTIONS | isDisableMentions | Enables/disables @mentions |
DeeperUserEngagement.MENTIONALL | setDisableMentionAll() | Enables/disables @all mentions |
DeeperUserEngagement.POLLS | pollAttachmentOptionVisibility | Shows/hides polls option |
DeeperUserEngagement.COLLABORATIVEWHITEBOARD | collaborativeWhiteboardOptionVisibility | Shows/hides whiteboard option |
DeeperUserEngagement.COLLABORATIVEDOCUMENT | collaborativeDocumentOptionVisibility | Shows/hides document option |
DeeperUserEngagement.VOICENOTES | voiceNoteButtonVisibility | Shows/hides voice notes button |
DeeperUserEngagement.STICKERS | stickersButtonVisibility | Shows/hides stickers button |
Users
TheapplySettingsToUsers method configures user list display options.
| Setting | Property | Description |
|---|---|---|
CoreMessagingExperience.USERANDFRIENDSPRESENCE | userStatusVisibility | Shows/hides online status indicator |
CallLogs
TheapplySettingsToCallLogs method configures call log display and call buttons.
| Setting | Property | Description |
|---|---|---|
VoiceAndVideoCalling.ONEONONEVIDEOCALLING | itemVideoCallIcon | Shows/hides video call icon |
VoiceAndVideoCalling.ONEONONEVOICECALLING | itemIncomingCallIcon | Shows/hides voice call icon |
GroupMembers
TheapplySettingToGroupMembers method configures moderator controls and member display options.
| Setting | Property | Description |
|---|---|---|
ModeratorControls.KICKUSERS | kickMemberOptionVisibility | Shows/hides kick member option |
ModeratorControls.BANUSERS | banMemberOptionVisibility | Shows/hides ban member option |
ModeratorControls.PROMOTEDEMOTEMEMBERS | scopeChangeOptionVisibility | Shows/hides promote/demote option |
CoreMessagingExperience.USERANDFRIENDSPRESENCE | userStatusVisibility | Shows/hides online status indicator |
Functional Changes via CometChatBuilderSettings
For functional changes (enabling/disabling features), you can directly access theCometChatBuilderSettings object:
Modifying Feature Flags at Runtime
You can modify feature flags at runtime by directly setting the values:Runtime changes to
CometChatBuilderSettings are not persisted. They will reset to the original values when the app restarts.UI/Theme Changes via themes.xml
For visual customizations (colors, fonts, spacing), modify thethemes.xml file in your res/values directory.
Customizing Colors
themes.xml
Customizing Typography
themes.xml
Pre-built Font Themes
The Builder includes pre-built font themes you can use:themes.xml
Customizing Component Styles
You can customize individual component styles by overriding their style attributes:themes.xml
Next Steps
UI Kit Builder Settings
Understand all available feature toggles and configuration options.
Components Overview
Explore all available UI components and their customization options.
Theming
Deep dive into colors, typography, and advanced styling.
Directory Structure
Understand how the exported code is organized.