Skip to main content
The 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

The BuilderSettingsHelper 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

  1. Import the helper into your Activity or Fragment
  2. Get a reference to your CometChat UI component
  3. Call the appropriate method to apply settings

Component-Level Customizations

MessageHeader

The applySettingsToMessageHeader method configures call buttons and user status visibility based on your Builder settings.
Settings Applied:

MessageList

The applySettingsToMessageList method configures message options, reactions, AI features, and more.
Settings Applied:

MessageComposer

The applySettingsToMessageComposer method configures attachment options, typing indicators, mentions, and more.
Settings Applied:

Users

The applySettingsToUsers method configures user list display options.
Settings Applied:

CallLogs

The applySettingsToCallLogs method configures call log display and call buttons.
Settings Applied:

GroupMembers

The applySettingToGroupMembers method configures moderator controls and member display options.
Settings Applied:

Functional Changes via CometChatBuilderSettings

For functional changes (enabling/disabling features), you can directly access the CometChatBuilderSettings 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 the themes.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.