消息气泡
Web IMKit 提供了自定义消息气泡的能力,以满足业务层对消息气泡的定制化需求。
定制化消息气泡
IRCKitMessageBubbleCfg 提供以下属性:
| 配置项 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| radius | Number | 20 | 气泡圆角半径。 |
| layout | RCKitBubbleLayout | RCKitBubbleLayout.LEFT_RIGHT | 气泡布局方式。有效值为 RCKitBubbleLayout.LEFT_RIGHT (左右布局)、RCKitBubbleLayout.LEFT_JUSTIFYING (靠左对齐)。 |
| backgroundColorForMyself | String/Number | #D2E1FE | 自己发送的消息气泡背景色。 |
| backgroundColorForOthers | String/Number | #F3F5FA | 其他人发送的消息气泡背景色。 |
| textColorForMyself | String/Number | #020814 | 自己发送的消息气泡文字颜色。 |
| textColorForOthers | String/Number | #020814 | 其他人发送的消息气泡文字颜色。 |
| showMyProfileInPrivateConversation | Boolean | true | 在单聊会话中,是否显示自己的头像。 |
| showMyNameInPrivateConversation | Boolean | false | 在单聊会话中,是否显示自己的名称。 |
| showMyProfileInGroupConversation | Boolean | true | 在群聊会话中,是否显示自己的头像。 |
| showMyNameInGroupConversation | Boolean | false | 在群聊会话中,是否显示自己的名称。 |
| showOthersProfileInPrivateConversation | Boolean | true | 在单聊会话中,是否显示他人的头像。 |
| showOthersNameInPrivateConversation | Boolean | false | 在单聊会话中,是否显示他人的名称。 |
| showOthersProfileInGroupConversation | Boolean | true | 在群聊会话中,是否显示他人的头像。 |
| showOthersNameInGroupConversation | Boolean | true | 在群聊会话中,是否显示他人的名称。 |