Interface IChannelSummaryProvider
-
- All Implemented Interfaces:
public interface IChannelSummaryProvider<T extends MessageContent>
-
-
Method Summary
Modifier and Type Method Description abstract booleanisSummaryType(MessageContent messageContent)Whether this template handles the given message content. abstract SpannablegetSummarySpannable(Context context, T t)The content to display in the conversation list when the last message is of this type. abstract booleanshowSummaryWithName()Whether to prepend the sender's name in the conversation summary. -
-
Method Detail
-
isSummaryType
abstract boolean isSummaryType(MessageContent messageContent)
Whether this template handles the given message content.
- Parameters:
messageContent- the message content to check- Returns:
true if this template handles this message; the upper layer will then call getSummarySpannable to obtain the resource. false if this template does not handle this message.
-
getSummarySpannable
abstract Spannable getSummarySpannable(Context context, T t)
The content to display in the conversation list when the last message is of this type. For example, an image message should return the string "Image".
- Parameters:
context- the contextt- the message content- Returns:
the spannable string to display in the conversation list
-
showSummaryWithName
abstract boolean showSummaryWithName()
Whether to prepend the sender's name in the conversation summary. This setting only applies to group channels.
- Returns:
whether to show the sender name
-
-
-
-