How to insert a custom view into the Conversation List #86
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 demonstrates how to insert a custom view between the conversation list header and the list itself. As a basic example, we'll add a 100-pixel tall transparent space using a custom component. This approach is useful for injecting banners, padding, dividers, or other custom content above the channel list.
Guide & Snippet
iOS
How to Insert a Custom View into the Conversation List
You can insert a custom view (like a banner) between the header and list by subclassing
SBAConversationListModule.Headerand overridinglayoutBody().Step 1: Create a Custom Header with Banner View
Step 2: Register the Custom Header
Notes:
SBALinearLayout.vStackto stack multiple views verticallyAndroid
Steps to insert a custom view into the Conversation List screen
Step 1: Create a Custom ViewComponent
Define a reusable ViewComponent that represents the custom content (in this case, an empty transparent view).
Step 2: Override the ConversationListModule to Insert the View
Extend ConversationListModule and override onCreateContentView() to control how the conversation screen layout is composed.
Step 3: Register the Custom Module
Finally, register your custom module so it will be used when launching the conversation list.
React
How to insert a custom view into the Conversation List
You can insert custom views (like banners, separators, or information cards) into the conversation list by wrapping the list with custom components or by customizing the list layout.
Method 1: Add Custom Views Around the List
Insert custom content before or after the conversation list:
Method 2: Custom Body with Injected Content
Step 1: Create a Custom Body Component
Create a custom body component that includes custom views:
Step 2: Register the Custom Body
Notes:
Reference
No response
Screenshots
No response
Beta Was this translation helpful? Give feedback.
All reactions