Overview
CometChatActionSheet is a component which presents options in a list and grid mode as per user’s choice. By default, CometChatActionSheet is an integrated into CometChatMessageComposer to allow users to send multiple types of media and custom messages.
Usage
CometChatActionSheet can be launched in a UI by adding below lines of code it into the java file.
- Java

Data Model
ActionItem class is a Data Model used to set Data in every Item of Action Sheet.
| Parameters | Type | Description |
|---|---|---|
| id | String | Used to set id so that every item in a list can be uniquely identify. |
| text | String | Used to set name of the Item in a list. |
| startIcon | @DrawableRes int | Used to set start icon in a list item. |
| startIconTint | @ColorInt int | Used to set start Icon tint |
| iconBackgroundColor | @ColorInt int | Used to set icon background color |
| textFont | String | Used to set text font |
| appearance | @StyleRes int | Used to set text Appearance |
| textColor | @ColorInt int | Used to set text Color |
| background | @ColorInt int | Used to set Item background color |
| cornerRadius | int | Used to set item corner radius |
- Java
Methods
Set List
| Method | Description |
|---|---|
| setList(List<ActionItem> list) | Sets the list of action items to be displayed in action sheet. |
- Java
Layout Mode
This method is used to set the default layout for the action sheet. It takes the LayoutMode which has two values as mention below.- listMode
- gridMode
| Method | Description |
|---|---|
| setLayoutMode(@ActionSheet.LayoutMode String mode) | Sets the default layout for the action sheet. It takes the LayoutMode which has two values. .listMode, .gridMode |
| setLayoutModeIcon(Drawable icon) | Sets the layout mode icon. |
| setLayoutModeIconTint(@ColorInt int color) | Sets the layout mode icon color. |
| setLayoutModeIconBackgroundColor(@ColorInt int color) | Sets the layout mode icon background color. |
| hideLayoutMode(boolean isHidden) | Used to hide/unhide layout mode icon. |
- Java

Title
| Methods | Description |
|---|---|
| setTitle(String title) | Sets the title in Action Sheet |
| setTitleColor(@ColorInt int color) | Sets the title color in Action Sheet |
| setTitleFont(String font) | Sets the title font in Action Sheet |
| setTitleAppearance(@StyleRes int appearance) | Sets the title appearance in Action Sheet |
- Java
| Method | Description |
|---|---|
| setBackground(@ColorInt int color) | This method will set the background color of Action Sheet. |
| setBackground(Drawable drawable) | This method will set the background drawable of Action Sheet. |
- Java
Events To receive the Callback when the user clicks on any item or reaction on an action sheet.
| Interfaces | Description |
|---|---|
| onReactionClick(Reaction reaction) | Triggers when a reaction is Tapped |
| onActionItemClick(ActionItem actionItem) | Triggers when any item is Tapped from a list of Action sheet |
- Java