How to customize the date separator label color in the conversation #136
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 date separator label color in the Conversation to use your own color.
Guide & Snippet
iOS
How to customize the date separator label color in the conversation
You can customize the date separator label of the conversation by subclassing
SBAMessageDateView
and overriding thesetupStyles()
method.Step 1: Create a Custom Class
Create a subclass of
SBAMessageDateView
and override thesetupStyles()
method:Step 2: Register the Custom class
Before presenting the conversation view, register your custom class:
Android
Steps to Customize Timeline Message Text Color
The following steps show how to change only the Timeline message text color, while keeping the rest of the UI/behavior intact.
1. Create a Custom Theme with Modified Timeline Style
Extend the default theme and override only the timelineStyle.textAppearance.
• 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