How to customize the font style of SentTime in message bubbles #91
AhyoungRyu
announced in
Conversation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Versions
Summary
This guide describes how to apply custom font styles to the SentTime (timestamp) in chat message bubbles.
Guide & Snippet
iOS
Header
Android
Customizing the Font Style or Color
This guide explains how to customize the appearance and layout of message bubbles in the SendBird AI Agent Android SDK, including sent time styling.
Overview
The AI Agent SDK provides message containers that handle by message alignments:
Each container provides overridable methods to customize individual UI components.
Message Container Types
1. OtherMessageContainer (Left-aligned)
Used for messages from other participants in the conversation.
Available customization methods:
drawSentAt(textView: TextView, message: BaseMessage, messageUIParams: MessageUIParams)
2. MyMessageContainer (Right-aligned)
Used for messages sent by the current user.
Available customization methods:
drawSentAt(textView: TextView, message: BaseMessage, messageUIParams: MessageUIParams)
ConversationMessageListUIParams)`
Available customization methods:
initialize(contentView: View, eventListeners: MessageEventListeners, messageListUIParams: ConversationMessageListUIParams, messageType: MessageType)
draw(channel: GroupChannel, message: BaseMessage, messageUIParams: MessageUIParams, messageListUIParams: ConversationMessageListUIParams)
Implementation Guide
Step 1: Create Custom Message Container
Create a custom container class that extends the appropriate base container:
Step 2: Create Custom Message Container Generator
Implement a custom generator to use your custom containers:
Step 3: Apply Custom Generator
Apply your custom generator to the conversation adapter:
JS
Customizing the Font Style of SentTime (Outgoing & Incoming)
This guide explains how to customize the font style of the SentTime (timestamp) component for both outgoing and incoming message bubbles in the Sendbird AI Agent React SDK.
Overview
The SentTime component is rendered as part of both outgoing and incoming message layouts. To customize its font style, you can override the default component with your own custom implementation.
Step 1: Create a Custom SentTime Component
Step 2: Apply the Custom SentTime Component
Reference
No response
Screenshots
No response
Beta Was this translation helpful? Give feedback.
All reactions