Class AttachmentFactoryManager
-
- All Implemented Interfaces:
public final class AttachmentFactoryManagerA manager for registered custom attachment factories.
-
-
Constructor Summary
Constructors Constructor Description AttachmentFactoryManager(List<AttachmentFactory> attachmentFactories)
-
Method Summary
Modifier and Type Method Description final BooleancanHandle(Message message)Checks if any AttachmentFactory can consume attachments from the given message. final InnerAttachmentViewHoldercreateViewHolder(Message message, MessageListListenerContainer listeners, ViewGroup parent)Create a ViewHolder for the custom attachments View which is aware of the parent's ViewHolder lifecycle. final InnerAttachmentViewHoldercreateViewHolder(Message message, MessageListListeners listeners, ViewGroup parent)-
-
Constructor Detail
-
AttachmentFactoryManager
AttachmentFactoryManager(List<AttachmentFactory> attachmentFactories)
-
-
Method Detail
-
canHandle
final Boolean canHandle(Message message)
Checks if any AttachmentFactory can consume attachments from the given message.
- Parameters:
message- The message containing custom attachments that we are going to render.- Returns:
True if there is a factory that can handle the attachments from this message.
-
createViewHolder
@Deprecated(message = "Use createViewHolder(message: Message, listeners: MessageListListeners?, parent: ViewGroup) instead", replaceWith = @ReplaceWith(imports = {}, expression = "createViewHolder(message, listeners, parent)"), level = DeprecationLevel.WARNING) final 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.- Returns:
An inner ViewHolder with the attachment content view.
-
createViewHolder
final InnerAttachmentViewHolder createViewHolder(Message message, MessageListListeners listeners, ViewGroup parent)
-
-
-
-