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

# Text Bubble

> Text Bubble — CometChat documentation.

`CometChatTextBubble` is the content view shown for TextMessage.

| Methods | Type | Description |
| - | - | - |
| **setText** | String | the text to display |
| **setStyle** | TextBubbleStyle | used to customize appearance of this widget |
| **setCompoundDrawable** | @DrawableRes int | used to set image at the start,end,top or bottom of the text. |
| **setCompoundDrawableIconTint** | @ColorInt int | used to set the image tint color |

## TextBubbleStyle

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

| Methods | Type | Description |
| - | - | - |
| **setTextAppearance** | @StyleRes int | used to set style of the text of the message |
| **setBackground** | @ColorInt int | used to set background color |
| **setBackground** | Drawable | used to set a Drawable background |
| **setBorderWidth** | int | used to set border |
| **setCornerRadius** | float | used to set corner radius |

## Usage

<Tabs>
  <Tab title="XML">
    ```xml theme={null}
    <com.cometchat.chatuikit.shared.views.CometChatTextBubble.CometChatTextBubble
            android:id="@+id/text_bubble"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    ```
  </Tab>
</Tabs>

<Tabs>
  <Tab title="Java">
    ```java theme={null}
    CometChatTextBubble cometChatTextBubble=view.findViewById(R.id.text_bubble);
    cometChatTextBubble.setText("Keep calm and chat on!");
    ```
  </Tab>

  <Tab title="Kotlin">
    ```kotlin theme={null}
    val cometChatTextBubble: CometChatTextBubble = findViewById(R.id.text_bubble)
    cometChatTextBubble.setText("Keep calm and chat on!")
    ```
  </Tab>
</Tabs>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.