CometChatImageBubble is the content view for a MediaMessage if the media sent is an image.
Methods
| Methods | Parameters | Description |
|---|---|---|
| setImageUrl | (String url, @DrawableRes int placeHolderImage, boolean isGif) | It used to set image url which to be rendered in image bubble |
| setCaption | (String caption) | a text to display below the image |
| setStyle | (ImageBubbleStyle style) | used to customize appearance of this widget |
| setOnClick | (OnClick onClick) | custom action on tapping the image |
ImageBubbleStyle
ImageBubbleStyle is the class containing attributes to customize appearance of this widget.| Methods | Type | Description |
|---|---|---|
| setTextAppearance | @StyleRes int | used to set style of the caption text |
| setBackground | @ColorInt int | used to set background color |
| setBackground | Drawable | used to set a gradient background |
| setBorderWidth | int | used to set border |
| setCornerRadius | float | used to set border radius |
Usage
- XML
- Java
- Kotlin