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: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.
MessageList
TheapplySettingsToMessageList method configures message options, reactions, AI features, and more.
MessageComposer
TheapplySettingsToMessageComposer method configures attachment options, typing indicators, mentions, and more.
Users
TheapplySettingsToUsers method configures user list display options.
CallLogs
TheapplySettingsToCallLogs method configures call log display and call buttons.
GroupMembers
TheapplySettingToGroupMembers method configures moderator controls and member display options.
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.