Skip to main content
FieldValue
Kotlin XML ViewsOverride XML styles extending CometChatIncomingMessageBubbleStyle / CometChatOutgoingMessageBubbleStyle in themes.xml
Jetpack ComposePass CometChatMessageListStyle.default().copy() with nested bubble styles to CometChatMessageList
Hub stylesIncoming and Outgoing bubble styles act as central hubs for per-type bubble customization
Per-type stylesText, Image, Audio, Video, File, Sticker, Poll, Collaborative, Meet Call, Delete, Action, Call Action
RelatedTheme Introduction · Component Styling · Message List
Configure and style incoming, outgoing, and specific message bubbles.

Styling Architecture

Message bubbles follow a hub-and-spoke pattern:
  1. Hub stylesIncomingMessageBubbleStyle and OutgoingMessageBubbleStyle control the base bubble appearance
  2. Per-type styles — Text, Image, Audio, etc. are nested inside the hub styles

Global Setup

themes.xml
<!-- Hub for Incoming Messages -->
<style name="CustomIncomingBubble" parent="CometChatIncomingMessageBubbleStyle">
    <item name="cometchatMessageBubbleBackgroundColor">#FEEDE1</item>
</style>

<!-- Hub for Outgoing Messages -->
<style name="CustomOutgoingBubble" parent="CometChatOutgoingMessageBubbleStyle">
    <item name="cometchatMessageBubbleBackgroundColor">#F76808</item>
</style>

<!-- Connect to AppTheme -->
<style name="AppTheme" parent="CometChatTheme.DayNight">
    <item name="cometchatIncomingMessageBubbleStyle">@style/CustomIncomingBubble</item>
    <item name="cometchatOutgoingMessageBubbleStyle">@style/CustomOutgoingBubble</item>
</style>

Core Message Bubbles

Text Bubble

themes.xml
<style name="CustomIncomingTextBubble" parent="CometChatIncomingTextMessageBubbleStyle">
    <item name="cometchatTextBubbleBackgroundColor">#FEEDE1</item>
</style>

<style name="CustomOutgoingTextBubble" parent="CometChatOutgoingTextBubbleStyle">
    <item name="cometchatTextBubbleBackgroundColor">#F76808</item>
</style>

<style name="CustomIncomingBubble" parent="CometChatIncomingMessageBubbleStyle">
    <item name="cometchatTextBubbleStyle">@style/CustomIncomingTextBubble</item>
</style>

<style name="CustomOutgoingBubble" parent="CometChatOutgoingMessageBubbleStyle">
    <item name="cometchatTextBubbleStyle">@style/CustomOutgoingTextBubble</item>
</style>

Image Bubble

themes.xml
<style name="CustomIncomingImageBubble" parent="CometChatIncomingImageMessageBubbleStyle">
    <item name="cometchatImageBubbleBackgroundColor">#FEEDE1</item>
</style>

<style name="CustomIncomingBubble" parent="CometChatIncomingMessageBubbleStyle">
    <item name="cometchatImageBubbleStyle">@style/CustomIncomingImageBubble</item>
</style>

Audio Bubble

themes.xml
<style name="CustomIncomingAudioBubble" parent="CometChatIncomingAudioBubbleStyle">
    <item name="cometchatAudioBubbleAudioWaveColor">#F76808</item>
    <item name="cometchatAudioBubblePlayIconTint">#F76808</item>
    <item name="cometchatAudioBubbleBackgroundColor">#FEEDE1</item>
</style>

<style name="CustomIncomingBubble" parent="CometChatIncomingMessageBubbleStyle">
    <item name="cometchatAudioBubbleStyle">@style/CustomIncomingAudioBubble</item>
</style>

Video Bubble

themes.xml
<style name="CustomIncomingVideoBubble" parent="CometChatIncomingVideoBubbleStyle">
    <item name="cometchatVideoBubbleBackgroundColor">#FEEDE1</item>
    <item name="cometchatVideoBubblePlayIconTint">#F76808</item>
</style>

<style name="CustomIncomingBubble" parent="CometChatIncomingMessageBubbleStyle">
    <item name="cometchatVideoBubbleStyle">@style/CustomIncomingVideoBubble</item>
</style>

File Bubble

themes.xml
<style name="CustomIncomingFileBubble" parent="CometChatIncomingFileBubbleStyle">
    <item name="cometchatFileBubbleBackgroundColor">#FEEDE1</item>
    <item name="cometchatFileBubbleFileDownloadIconTint">#F76808</item>
</style>

<style name="CustomIncomingBubble" parent="CometChatIncomingMessageBubbleStyle">
    <item name="cometchatFileBubbleStyle">@style/CustomIncomingFileBubble</item>
</style>

Sticker Bubble

themes.xml
<style name="CustomStickerBubble" parent="CometChatStickerBubbleStyle">
    <item name="cometchatStickerBubbleBackgroundColor">#FEEDE1</item>
</style>

<style name="CustomIncomingBubble" parent="CometChatIncomingMessageBubbleStyle">
    <item name="cometchatStickerBubbleStyle">@style/CustomStickerBubble</item>
</style>

Poll Bubble

themes.xml
<style name="CustomOutgoingPollBubble" parent="CometChatOutgoingPollBubbleStyle">
    <item name="cometchatPollBubbleBackgroundColor">#F76808</item>
    <item name="cometchatPollBubbleProgressBackgroundColor">#FBAA75</item>
</style>

<style name="CustomOutgoingBubble" parent="CometChatOutgoingMessageBubbleStyle">
    <item name="cometchatPollBubbleStyle">@style/CustomOutgoingPollBubble</item>
</style>

Collaborative Bubble

themes.xml
<style name="CustomCollaborativeBubble" parent="CometChatOutgoingCollaborativeBubbleStyle">
    <item name="cometchatCollaborativeBubbleBackgroundColor">#F76808</item>
    <item name="cometchatCollaborativeBubbleSeparatorColor">#FBAA75</item>
</style>

<style name="CustomOutgoingBubble" parent="CometChatOutgoingMessageBubbleStyle">
    <item name="cometchatCollaborativeBubbleStyle">@style/CustomCollaborativeBubble</item>
</style>

Meet Call Bubble

themes.xml
<style name="CustomMeetCallBubble" parent="CometChatOutgoingMeetCallBubbleStyle">
    <item name="cometchatMeetCallBubbleBackgroundColor">#F76808</item>
    <item name="cometchatMeetCallBubbleCallIconTint">#F76808</item>
</style>

<style name="CustomOutgoingBubble" parent="CometChatOutgoingMessageBubbleStyle">
    <item name="cometchatMeetCallBubbleStyle">@style/CustomMeetCallBubble</item>
</style>

Delete Bubble

themes.xml
<style name="CustomDeleteBubble" parent="CometChatOutgoingDeleteBubbleStyle">
    <item name="cometchatMessageBubbleBackgroundColor">#F76808</item>
</style>

<style name="CustomOutgoingBubble" parent="CometChatOutgoingMessageBubbleStyle">
    <item name="cometchatDeleteBubbleStyle">@style/CustomDeleteBubble</item>
</style>

List-Level Bubbles

These bubbles are tied to the Message List style, not the Incoming/Outgoing hubs.

Call Action Bubble

themes.xml
<style name="CustomCallActionBubble" parent="CometChatCallActionBubbleStyle">
    <item name="cometchatCallActionBubbleBackgroundColor">#FEEDE1</item>
    <item name="cometchatCallActionBubbleTextColor">#F76808</item>
    <item name="cometchatCallActionBubbleIconTint">#F76808</item>
</style>

<style name="CustomMessageListStyle" parent="CometChatMessageListStyle">
    <item name="cometchatMessageListCallActionBubbleStyle">@style/CustomCallActionBubble</item>
</style>

<style name="AppTheme" parent="CometChatTheme.DayNight">
    <item name="cometchatMessageListStyle">@style/CustomMessageListStyle</item>
</style>

Action Bubble

themes.xml
<style name="CustomActionBubble" parent="CometChatActionBubbleStyle">
    <item name="cometchatActionBubbleBackgroundColor">#FEEDE1</item>
    <item name="cometchatActionBubbleTextColor">#F76808</item>
</style>

<style name="CustomMessageListStyle" parent="CometChatMessageListStyle">
    <item name="cometchatMessageListActionBubbleStyle">@style/CustomActionBubble</item>
</style>

<style name="AppTheme" parent="CometChatTheme.DayNight">
    <item name="cometchatMessageListStyle">@style/CustomMessageListStyle</item>
</style>