How to Customize the List Item View in the Conversation List #97
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 item view inside the ConversationList, allowing you to apply your own layout and data
Guide & Snippet
iOS
How to Customize the List Item View
You can customize the layout of conversation list items by subclassing
SBAConversationCelland overridinglayoutBody().Step 1: Create a Custom Cell
Step 2: Register the Custom Cell
Notes:
layoutLeftItems(),layoutRightItems(),layoutContents()to reorder elementsSBALinearLayout.zStackallows layering views (e.g., divider at bottom)Android
Steps to Customize Conversation List Items
Step 1: Create a Custom Layout for the List Item
Define your desired UI layout in an XML file (e.g., view_custom_conversation_list_item.xml).
This layout will replace the default conversation list item.
Step 2: Create a Custom ViewHolder
Extend ConversationViewHolder and bind your custom layout using ViewBinding.
Handle UI rendering and click events within this ViewHolder.
Step 3: Extend ConversationListAdapter and Use the Custom ViewHolder
Override onCreateViewHolder to return your custom ViewHolder.
Step 4: Register the Custom Adapter with AIAgentAdapterProviders
Finally, register your adapter before rendering the Conversation screen:
React
How to customize the List Item View in the Conversation List
You can customize the conversation list item appearance by creating a custom template for
ConversationListItemLayout.Step 1: Create a Custom List Item Component
Step 2: Register the Custom Component
Notes:
Reference
No response
Screenshots
No response
Beta Was this translation helpful? Give feedback.
All reactions