How to customize the left/right areas in the Conversation headerView #128
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 shows how to set up and apply layouts for the left and right areas of the Conversation HeaderView.
Guide & Snippet
iOS
How to Customize the Left/Right Areas in the Conversation HeaderView
This guide shows how to set up and apply layouts for the left and right areas of the Conversation HeaderView.
You can customize the header layout of the conversation screen by subclassing
SBAConversationModule.Header
and overriding thelayoutLeftItems()
andlayoutRightItems()
methods. This allows you to rearrange, add, or remove items in the header's left and right areas.When composing layouts, use
SBALinearLayout
to arrange views. This utility provides convenient methods for creating horizontal and vertical stack layouts to organize your UI elements.Step 1: Create a Custom Header Class
Create a subclass of
SBAConversationModule.Header
and override the layout methods:Step 2: Register the Custom Header
Before presenting the conversation view, register your custom header class:
Example Configurations:
Show only menu button on the left, handoff button on the right:
Multiple buttons on the right side:
Available Default Buttons:
closeButton
- Closes the conversation viewmenuButton
- Opens the menu optionshandoffButton
- Handles agent handoff functionalityNotes:
SBALinearLayout
to arrange views when composing your layoutsSBALinearLayout.hStack
creates a horizontal stack for arranging multiple buttons side by sidenil
from either layout method will completely remove items from that areaAndroid
Header
How to Customize the Left/Right Areas in the Conversation HeaderView
You can modify the conversation header information through ConversationModuleProviders, and the properties changed here are applied to the View when onCreateView is executed after the module is created.
JS
Header
// code block
Reference
No response
Screenshots
No response
Beta Was this translation helpful? Give feedback.
All reactions