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 Item | Type | Default Value | Description |
---|---|---|---|
redius | Number | 8 | Bubble corner radius |
layout | RCKitBubbleLayout | RCKitBubbleLayout.LEFT_RIGHT | Bubble layout method, valid values are RCKitBubbleLayout.LEFT_RIGHT (left-right layout), RCKitBubbleLayout.LEFT_JUSTIFYING (left-justified) |
backgroundColorForMyself | Number | 0x0099FF | Background color for messages sent by myself |
backgroundColorForOthers | Number | 0xFFFFFF | Background color for messages sent by others |
textColorForMyself | Number | 0xFFFFFF | Text color for messages sent by myself |
textColorForOthers | Number | 0x000000 | Text color for messages sent by others |
showMyProfileInPrivateConversation | Boolean | true | Whether to display my avatar in one-to-one chat |
showMyNameInPrivateConversation | Boolean | true | Whether to display my name in one-to-one chat |
showMyProfileInGroupConversation | Boolean | true | Whether to display my avatar in group chat |
showMyNameInGroupConversation | Boolean | true | Whether to display my name in group chat |
showOthersProfileInPrivateConversation | Boolean | true | Whether to display others' avatars in one-to-one chat |
showOthersNameInPrivateConversation | Boolean | true | Whether to display others' names in one-to-one chat |
showOthersProfileInGroupConversation | Boolean | true | Whether to display others' avatars in group chat |
showOthersNameInGroupConversation | Boolean | true | Whether 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);