public class PublicServiceMultiRichContentMessageProvider extends BaseMessageItemProvider<PublicServiceMultiRichContentMessage>
Modifier and Type | Class and Description |
---|---|
protected static class |
PublicServiceMultiRichContentMessageProvider.MyViewHolder |
BaseMessageItemProvider.MessageViewHolder
mConfig
Constructor and Description |
---|
PublicServiceMultiRichContentMessageProvider() |
Modifier and Type | Method and Description |
---|---|
protected void |
bindMessageContentViewHolder(ViewHolder holder,
ViewHolder parentHolder,
PublicServiceMultiRichContentMessage content,
UiMessage uiMessage,
int position,
java.util.List<UiMessage> list,
IViewProviderListener<UiMessage> listener)
设置消息视图里各 view 的值
|
android.text.Spannable |
getSummarySpannable(android.content.Context context,
PublicServiceMultiRichContentMessage richContentMessage)
在会话列表页某条会话最后一条消息为该类型消息时,会话里需要展示的内容。
比如: 图片消息在会话里需要展示为"图片",那返回对应的字符串资源即可。
|
protected boolean |
isMessageViewType(MessageContent messageContent)
根据消息内容,判断是否为本模板需要展示的消息类型
|
protected ViewHolder |
onCreateMessageContentViewHolder(android.view.ViewGroup parent,
int viewType)
创建 ViewHolder
|
protected boolean |
onItemClick(ViewHolder holder,
PublicServiceMultiRichContentMessage content,
UiMessage uiMessage,
int position,
java.util.List<UiMessage> list,
IViewProviderListener<UiMessage> listener) |
bindViewHolder, isItemViewType, isSummaryType, onCreateViewHolder, onItemLongClick, showReadReceiptRequest, showSummaryWithName
public PublicServiceMultiRichContentMessageProvider()
protected ViewHolder onCreateMessageContentViewHolder(android.view.ViewGroup parent, int viewType)
BaseMessageItemProvider
onCreateMessageContentViewHolder
in class BaseMessageItemProvider<PublicServiceMultiRichContentMessage>
parent
- 父 ViewGroupviewType
- 视图类型protected void bindMessageContentViewHolder(ViewHolder holder, ViewHolder parentHolder, PublicServiceMultiRichContentMessage content, UiMessage uiMessage, int position, java.util.List<UiMessage> list, IViewProviderListener<UiMessage> listener)
BaseMessageItemProvider
bindMessageContentViewHolder
in class BaseMessageItemProvider<PublicServiceMultiRichContentMessage>
holder
- ViewHolderparentHolder
- 父布局的 ViewHoldercontent
- 此展示模板对应的消息uiMessage
- UiMessage
position
- 消息位置list
- 列表listener
- ViewModel 的点击事件监听器。如果某个子 view 的点击事件需要 ViewModel 处理,可通过此监听器回调。public android.text.Spannable getSummarySpannable(android.content.Context context, PublicServiceMultiRichContentMessage richContentMessage)
IConversationSummaryProvider
context
- 上下文richContentMessage
- 消息内容protected boolean onItemClick(ViewHolder holder, PublicServiceMultiRichContentMessage content, UiMessage uiMessage, int position, java.util.List<UiMessage> list, IViewProviderListener<UiMessage> listener)
onItemClick
in class BaseMessageItemProvider<PublicServiceMultiRichContentMessage>
holder
- ViewHoldercontent
- 自定义消息uiMessage
- UiMessage
position
- 位置list
- 列表数据listener
- ViewModel 的点击事件监听器。如果某个子 view 的点击事件需要 ViewModel 处理,可通过此监听器回调。protected boolean isMessageViewType(MessageContent messageContent)
BaseMessageItemProvider
isMessageViewType
in class BaseMessageItemProvider<PublicServiceMultiRichContentMessage>
messageContent
- 消息内容