public abstract class BaseNotificationMessageItemProvider<T extends MessageContent> extends java.lang.Object implements IMessageProvider<T>
Constructor and Description |
---|
BaseNotificationMessageItemProvider() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
bindMessageContentViewHolder(ViewHolder holder,
ViewHolder parentHolder,
T t,
UiMessage uiMessage,
int position,
java.util.List<UiMessage> list,
IViewProviderListener<UiMessage> listener) |
void |
bindViewHolder(ViewHolder holder,
UiMessage uiMessage,
int position,
java.util.List<UiMessage> list,
IViewProviderListener<UiMessage> listener)
根据数据源绑定视图
|
boolean |
isItemViewType(UiMessage item) |
protected abstract boolean |
isMessageViewType(MessageContent messageContent) |
boolean |
isSummaryType(MessageContent messageContent)
是否为本模板处理的消息内容。
|
protected abstract ViewHolder |
onCreateMessageContentViewHolder(android.view.ViewGroup parent,
int viewType) |
ViewHolder |
onCreateViewHolder(android.view.ViewGroup parent,
int viewType) |
boolean |
showSummaryWithName()
是否需要在会话里拼接发送者名称。
此配置只对群组会话有效。
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSummarySpannable
public ViewHolder onCreateViewHolder(android.view.ViewGroup parent, int viewType)
onCreateViewHolder
in interface IViewProvider<UiMessage>
protected abstract ViewHolder onCreateMessageContentViewHolder(android.view.ViewGroup parent, int viewType)
protected abstract void bindMessageContentViewHolder(ViewHolder holder, ViewHolder parentHolder, T t, UiMessage uiMessage, int position, java.util.List<UiMessage> list, IViewProviderListener<UiMessage> listener)
public void bindViewHolder(ViewHolder holder, UiMessage uiMessage, int position, java.util.List<UiMessage> list, IViewProviderListener<UiMessage> listener)
IViewProvider
bindViewHolder
in interface IViewProvider<UiMessage>
holder
- 视图uiMessage
- 数据position
- 位置public boolean isSummaryType(MessageContent messageContent)
IConversationSummaryProvider
isSummaryType
in interface IConversationSummaryProvider<T extends MessageContent>
messageContent
- 待处理的消息内容IConversationSummaryProvider.getSummarySpannable(Context, MessageContent)
()} 获取资源。
false 代表不是本模板需要处理的消息。public boolean isItemViewType(UiMessage item)
isItemViewType
in interface IViewProvider<UiMessage>
item
- 数据protected abstract boolean isMessageViewType(MessageContent messageContent)
public boolean showSummaryWithName()
IConversationSummaryProvider
showSummaryWithName
in interface IConversationSummaryProvider<T extends MessageContent>