How to change the alignment of the center content Areas in the Conversation HeaderView #134
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
How to change the alignment of the center content Areas in the Conversation HeaderView
Guide & Snippet
iOS
Changing titleView alignment in Conversation Header
This guide explains how to change the alignment of the titleView in the Conversation Header in the conversation message list.
contentAlignmentproperty in the AIAgentMessenger.config.conversation.header.Example:
Explanation:
contentAlignment= .leading → Leading-aligns the titleView in the header (default).contentAlignment= .center → Center-aligns the titleView in the header.contentAlignment= .trailing → Trailing-aligns the titleView in the header.Android
Steps to Customize Conversation Header content Gravity
The following steps show how to change only the Conversation header's gravity (alignment) while keeping the rest of the UI/behavior intact. Unlike title customization, no subclass is required—just set the gravity on the provided component.
Step 1: Register a ConversationModule with header gravity
Call the provider and set the header gravity using setContentGravity(...).
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.
React
Changing titleView alignment in Conversation Header
This guide explains how to change the alignment of the titleView in the Conversation Header in the conversation message list.
You can set the alignment of the conversation header titleView using the
titleAlignproperty in theConversationHeaderLayouttemplate.Example:
Explanation:
titleAlign={'start'}- Left-aligns the titleView in the headertitleAlign={'center'}- Center-aligns the titleView in the headertitleAlign={'end'}- Right-aligns the titleView in the headerReference
No response
Screenshots
Beta Was this translation helpful? Give feedback.
All reactions