> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-rn-guide-message-privately.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# File Bubble

> File Bubble — CometChat documentation.

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

## Methods

| methods             | Type            | Description                                        |
| ------------------- | --------------- | -------------------------------------------------- |
| **setFileUrl**      | String          | the path of the image to display                   |
| **setTitleText**    | String          | a text to display as name of the file              |
| **setSubtitleText** | String          | a text to display below the name of the file       |
| **setDownloadIcon** | Icon            | customize the icon to display to download the file |
| **setStyle**        | FileBubbleStyle | used to customize appearance of this widget        |

## FileBubbleStyle

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

| Methods                       | Type          | Description                                              |
| ----------------------------- | ------------- | -------------------------------------------------------- |
| **setTitleTextAppearance**    | TextStyle     | used to set style of the name of the file                |
| **setSubtitleTextAppearance** | TextStyle     | used 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                             |
| **setBackground**             | Drawable      | used to set a drawable background                        |
| **setBorderColor**            | @ColorInt int | used to set border color                                 |
| **setBorderWidth**            | int           | used to set border width                                 |
| **setCornerRadius**           | float         | used to set border radius                                |

## Usage

<Tabs>
  <Tab title="Java">
    ```java theme={null}
    CometChatFileBubble fileBubble = new CometChatFileBubble(getContext());
            fileBubble.setFileUrl("https://images.pexels.com/photos/1496372/pexels-photo-1496372.jpeg", "Sample file", "image");
    ```
  </Tab>

  <Tab title="Kotlin">
    ```kotlin theme={null}
    val fileBubble = CometChatFileBubble(getContext())
    fileBubble.setFileUrl(
                "https://images.pexels.com/photos/1496372/pexels-photo-1496372.jpeg",
                "Sample file",
                "image")
    ```
  </Tab>
</Tabs>
