Skip to main content
Version: v4

Message Bubble

Overview

CometChatMessageBubble is the reusable components which forms different types of message bubbles accordingly.

There are different section available in message bubble which can be altered by passing CometChatMessageTemplate in CometChatMessages

Sections

Following are the sections in message bubble

  1. Header View
  2. Leading View
  3. Content View
  4. Bottom View
  5. Thread View
  6. footer view

Methods

MethodsTypeDescription
setLeadingViewViewused to set view in leadingView section
setHeaderViewViewused to set view in headerview section
setReplyViewViewused to set view in replyview section
setContentViewViewused to set content view , by default all different type of bubble are shown here
setThreadViewViewused to set view in threadview section , by default threaded section is shown
setFooterViewViewused to set footer view for message bubble , by default message receipt is shown
setMessageAlignmentUIKitConstants.MessageBubbleAlignmentused to set bubble alignment , can be left, right and center
setStyleMessageBubbleStyleused to set styling properties foe message bubble
setBottomViewViewused to set bottom view for message bubble , by default reactions are shown here

style

MethodsTypeDescription
setBackground@ColorInt

int
used to set the background color
setBackgroundDrawableused to set background drawable
setBorderWidth@Dimension

int
used to set border
setCornerRadiusfloatused to set border radius
setBorderColor@ColorInt

int
used to set border color