Interface AttachmentPreviewFactory
-
- All Implemented Interfaces:
public interface AttachmentPreviewFactoryA factory responsible for creating attachment preview ViewHolders.
-
-
Method Summary
Modifier and Type Method Description abstract BooleancanHandle(Attachment attachment)Checks if the factory can create a preview ViewHolder for this attachment. abstract AttachmentPreviewViewHolderonCreateViewHolder(ViewGroup parentView, Function1<Attachment, Unit> attachmentRemovalListener, MessageComposerViewStyle style)Creates and instantiates a new instance of AttachmentPreviewViewHolder. -
-
Method Detail
-
canHandle
abstract Boolean canHandle(Attachment attachment)
Checks if the factory can create a preview ViewHolder for this attachment.
- Parameters:
attachment- The attachment we want to show a preview for.- Returns:
True if the factory is able to provide a preview for the given Attachment.
-
onCreateViewHolder
abstract AttachmentPreviewViewHolder onCreateViewHolder(ViewGroup parentView, Function1<Attachment, Unit> attachmentRemovalListener, MessageComposerViewStyle style)
Creates and instantiates a new instance of AttachmentPreviewViewHolder.
- Parameters:
parentView- The parent container.attachmentRemovalListener- Click listener for the remove attachment button.style- Used to style the factory.- Returns:
An instance of attachment preview ViewHolder.
-
-
-
-