Skip to main content
Version: v4

File Bubble

CometChatFileBubble is the content view for a MediaMessage if the media sent is a file.

Methods

methodsTypeDescription
setFileUrlStringthe path of the image to display
setTitleTextStringa text to display as name of the file
setSubtitleTextStringa text to display below the name of the file
setDownloadIconIconcustomize the icon to display to download the file
setStyleFileBubbleStyleused to customize appearance of this widget

FileBubbleStyle

FileBubbleStyle is the class containing attributes to customize appearance of this widget.

MethodsTypeDescription
setTitleTextAppearanceTextStyleused to set style of the name of the file
setSubtitleTextAppearanceTextStyleused to set style of the text below the name of the file
setDownloadIconTint@ColorInt

int
used to provide color to the download icon
setBackground@ColorInt

int
used to set background color
setBackgroundDrawableused to set a drawable background
setBorderColor@ColorInt

int
used to set border color
setBorderWidthintused to set border width
setCornerRadiusfloatused to set border radius

Usage

CometChatFileBubble fileBubble = new CometChatFileBubble(getContext());
fileBubble.setFileUrl("https://images.pexels.com/photos/1496372/pexels-photo-1496372.jpeg", "Sample file", "image");