Class FallbackAttachmentPreviewFactory

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Boolean canHandle(Attachment attachment) Checks if the factory can create a preview ViewHolder for this attachment.
      AttachmentPreviewViewHolder onCreateViewHolder(ViewGroup parentView, Function1<Attachment, Unit> attachmentRemovalListener, MessageComposerViewStyle style) Creates and instantiates a new instance of FallbackAttachmentPreviewViewHolder.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FallbackAttachmentPreviewFactory

        FallbackAttachmentPreviewFactory()
    • Method Detail

      • canHandle

         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

         AttachmentPreviewViewHolder onCreateViewHolder(ViewGroup parentView, Function1<Attachment, Unit> attachmentRemovalListener, MessageComposerViewStyle style)

        Creates and instantiates a new instance of FallbackAttachmentPreviewViewHolder.

        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.