Skip to main content

Message Bubble

Global IM UIKit provides the ability to customize message bubbles to meet the customization needs of the business layer.

Customizing Message Bubbles​

IRCKitMessageBubbleCfg offers the following properties:

Configuration ItemTypeDefault ValueDescription
rediusNumber8Bubble corner radius
layoutRCKitBubbleLayoutRCKitBubbleLayout.LEFT_RIGHTBubble layout method, valid values are RCKitBubbleLayout.LEFT_RIGHT (left-right layout), RCKitBubbleLayout.LEFT_JUSTIFYING (left-justified)
backgroundColorForMyselfNumber0x0099FFBackground color for messages sent by myself
backgroundColorForOthersNumber0xFFFFFFBackground color for messages sent by others
textColorForMyselfNumber0xFFFFFFText color for messages sent by myself
textColorForOthersNumber0x000000Text color for messages sent by others
showMyProfileInPrivateConversationBooleantrueWhether to display my avatar in one-to-one chat
showMyNameInPrivateConversationBooleantrueWhether to display my name in one-to-one chat
showMyProfileInGroupConversationBooleantrueWhether to display my avatar in group chat
showMyNameInGroupConversationBooleantrueWhether to display my name in group chat
showOthersProfileInPrivateConversationBooleantrueWhether to display others' avatars in one-to-one chat
showOthersNameInPrivateConversationBooleantrueWhether to display others' names in one-to-one chat
showOthersProfileInGroupConversationBooleantrueWhether to display others' avatars in group chat
showOthersNameInGroupConversationBooleantrueWhether to display others' names in group chat

Get Current Bubble Configuration​

const config = kitApp.cloneMessageBubbleCfg();

Update Bubble Configuration​

tip

Updating the bubble configuration is only effective before calling kitApp.ready().

kitApp.setMessageBubbleCfg(config);