Text Bubble
CometChatTextBubble
is the content view shown for TextMessage.
Properties
Name | Type | Description |
---|---|---|
text | string | Text to be displayed |
textStyle | TextBubbleStyle | Styling properties and values of the Text bubble element |
TextBubbleStyle
Name | Description |
---|---|
textFont | Sets all the different properties of font for the text. Reference link |
textColor | Sets the foreground color of the text. |
Usage
- Javascript
import '@cometchat/uikit-elements'; //import the web elements package
//use the element
<cometchat-text-bubble text="Hey, there!!"></cometchat-text-bubble>
Usage
- XML
<com.cometchat.chatuikit.shared.views.CometChatTextBubble.CometChatTextBubble
android:id="@+id/text_bubble"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
- Java
- Kotlin
CometChatTextBubble cometChatTextBubble=view.findViewById(R.id.text_bubble);
cometChatTextBubble.setText("Keep calm and chat on!");
val cometChatTextBubble: CometChatTextBubble = findViewById(R.id.text_bubble)
cometChatTextBubble.setText("Keep calm and chat on!")