-
public interface AttachmentFactoryRepresents a handler that can handle custom attachments of certain type and create ViewHolders for them.
-
-
Method Summary
Modifier and Type Method Description abstract BooleancanHandle(Message message)Checks if this AttachmentFactory can consume attachments from the given message. InnerAttachmentViewHoldercreateViewHolder(Message message, MessageListListenerContainer listeners, ViewGroup parent)Create a ViewHolder for the custom attachments View which is aware of the parent's ViewHolder lifecycle. InnerAttachmentViewHoldercreateViewHolder(Message message, MessageListListeners listeners, ViewGroup parent)Create a ViewHolder for the custom attachments View which is aware of the parent's ViewHolder lifecycle. -
-
Method Detail
-
canHandle
abstract Boolean canHandle(Message message)
Checks if this AttachmentFactory can consume attachments from the given message.
- Parameters:
message- The message containing custom attachments that we are going to render.
-
createViewHolder
@Deprecated(message = Use createViewHolder(message: Message, listeners: MessageListListeners?, parent: ViewGroup) instead, replaceWith = @ReplaceWith(imports = {}, expression = createViewHolder(message, listeners, parent)), level = DeprecationLevel.WARNING) InnerAttachmentViewHolder createViewHolder(Message message, MessageListListenerContainer listeners, ViewGroup parent)
Create a ViewHolder for the custom attachments View which is aware of the parent's ViewHolder lifecycle.
- Parameters:
message- The message containing custom attachments that we are going to render.listeners- MessageListListenerContainer with listeners for the message list.parent- The parent View where the attachment content view is supposed to be placed.
-
createViewHolder
InnerAttachmentViewHolder createViewHolder(Message message, MessageListListeners listeners, ViewGroup parent)
Create a ViewHolder for the custom attachments View which is aware of the parent's ViewHolder lifecycle.
- Parameters:
message- The message containing custom attachments that we are going to render.listeners- MessageListListeners with listeners for the message list.parent- The parent View where the attachment content view is supposed to be placed.
-
-
-
-