How to add a left button to the conversation list header #76
elliot-choic
announced in
Conversation List
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 conversation list header to add a left-side button by creating a custom view
Guide & Snippet
iOS
How to Add a Left Button to the Conversation List Header
You can add a custom button to the left side of the header by subclassing
SBAConversationListModule.Headerand overridinglayoutLeftItems(). To handle button taps in the ViewController, use the delegate event system.Step 1: Create a Custom Header with Left Button
Step 2: Create a ViewController to Handle the Event
Step 3: Register Both Custom Components
Notes:
layoutLeftItems()for left-side buttons,layoutRightItems()for right-side buttons.custom(name: "event_name", data: yourData)super.conversationListModule(...)for unhandled eventsAndroid
Steps to Customize the Header
Step 1: Create a Custom View
Create a view class (e.g.,
CustomConversationListHeaderView) that:applyTheme(...).draw(...).setLeftButtonClickListener(...).Step 2: Create a Custom Component
Create a component class that extends
ConversationListHeaderComponent(e.g.,CustomConversationListHeaderComponent) and overrideonCreateView(...)to return your custom view.Step 2: Register the Component via AIAgentModuleProviders
React
How to Add a Left Button to the Conversation List Header
This guide explains how to customize the conversation list header to add a left-side button by creating a custom view.
You can add a custom button to the left side of the header by using
ConversationListHeaderLayoutand overriding theStartAreacomponent.Step 1: Create a Custom Start Area Component
Create a custom component for the left side of the header:
Step 2: Apply Customization
Wrap your customizations within
AgentProviderContainer:Available Default Components:
StartArea- Left section (empty by default)TitleArea- Center section (contains Title by default)EndArea- Right section (contains CloseButton by default)Title- Conversation list titleCloseButton- Close widget buttonNotes:
entryStylemakes theAgentProviderContainerentry element fill the host layout instead of using its default fit-content size.Reference
No response
Screenshots
No response
Beta Was this translation helpful? Give feedback.
All reactions