setOptions vs addOptions
| Method | Behavior |
|---|---|
setOptions | Replaces all default options with your custom list |
addOptions | Appends your custom options to the existing defaults |
addOptions to keep defaults (like “Delete”) and add your own. Use setOptions for full control.
Adding Custom Options
- Kotlin (XML Views)
- Jetpack Compose
Replacing All Options
- Kotlin (XML Views)
- Jetpack Compose
MenuItem Properties
- Kotlin (XML Views)
- Jetpack Compose
CometChatPopupMenu.MenuItem:| Property | Type | Description |
|---|---|---|
id | String | Unique identifier |
name | String | Display text |
startIcon | Drawable? | Icon at the start |
endIcon | Drawable? | Icon at the end |
startIconTint | @ColorInt Int | Start icon tint |
textColor | @ColorInt Int | Text color |
textAppearance | @StyleRes Int | Text appearance |
onClick | (() -> Unit)? | Click callback |
Components with Menu Options
| Component | Data passed to callback |
|---|---|
CometChatConversations | (Context, Conversation) |
CometChatUsers | (Context, User) |
CometChatGroups | (Context, Group) |
CometChatGroupMembers | (Context, GroupMember) |
CometChatCallLogs | (Context, CallLog) |
Related
- Customization Overview — See all customization categories.