CometChatMentionsFormatter
class is a part of the CometChat UI Kit, a ready-to-use chat UI component library for integrating CometChat into your Android applications. This class provides functionality to format mentions within text messages displayed in the chat interface. Mentions allow users to reference other users within a conversation, providing a convenient way to direct messages or involve specific participants.
CometChatMentionsFormatter
class into your application:
CometChatMentionsFormatter
class and configure it with desired settings, such as mention text styles and limit settings.
setOnMentionCLick
).
CometChatMentionsFormatter
class in components such as CometChatConversations, CometChatMessageList, CometChatMessageComposer.
Methods | Description | Code |
---|---|---|
Set Mention Limit | Sets the limit for the number of mentions allowed. | setLimit(limit: number) |
Set GroupMembersRequestBuilder | Sets the builder for fetching users or group members. | setSearchRequestBuilder(requestBuilder: CometChat.UsersRequestBuilder | CometChat.GroupMembersRequestBuilder) |
Set OnMentionClick | Sets a listener for mention click in Message Bubbles events. | setOnMentionClick(callBack: (message: CometChat.BaseMessage, uid: string) => void); |
Methods | Type | Description |
---|---|---|
textStyle | TextStyle | The text style to be applied to mentions |
loggedInUserTextStyle | TextStyle | The text style to be applied to the logged-in user’s mentions |