How to customize the time label color in the conversation message #135
tezpark
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 explains how to customize the time label color in the Conversation message to use your own color.
Guide & Snippet
iOS
How to customize the time label color in the conversation message
You can customize the stateView of the conversation message by subclassing
SBAMessageStateView
and overriding thesetupStyles()
method.Step 1: Create a Custom Class
Create a subclass of
SBAMessageStateView
and override thesetupStyles()
method:Step 2: Register the Custom class
Before presenting the conversation view, register your custom class:
Android
Steps to Customize “Sent At” Text Appearance in Other User Messages
The following steps show how to change only the sent-at (timestamp) text appearance of other users’ messages, while keeping the rest of the UI/behavior intact.
1. Create a Custom Theme with Modified OtherUserMessageStyle
Extend the default MessengerTheme and override only sentAtAppearance inside OtherUserMessageStyle.
• FONT_STYLE_RES: the text style resource (e.g., R.style.Caption2OnLightMidEmphasis).
• TEXT_COLOR_INT: the color integer (e.g., Color.RED).
2. Register the Custom Theme with AIAgentThemeProviders
Assign your theme to the light provider:
Note: Dark Theme
To apply the same customization for dark mode, register with the dark provider:
Important: This registration must be done before calling MessengerLauncher.attach() or launching MessengerActivity.
The provider must be ready before the screen is created in order for the custom component to take effect.
JS
Header
// code block
Reference
No response
Screenshots
Beta Was this translation helpful? Give feedback.
All reactions