State Types
| State | When it shows |
|---|---|
| Loading | Data is being fetched |
| Empty | No data to display |
| Error | An error occurred during data fetching |
Replacing State Views
- Kotlin (XML Views)
- Jetpack Compose
Each component accepts a Example custom empty layout:
View? for each state:res/layout/custom_empty_state.xml
Hiding State Views
- Kotlin (XML Views)
- Jetpack Compose
Components like For components that don’t have dedicated hide methods (e.g.,
CometChatMessageList provide explicit hide methods:CometChatConversations), pass null to remove a custom state view:Components with State Views
State views are available on all list-based components:| Component | States supported |
|---|---|
CometChatConversations | Loading, Empty, Error |
CometChatUsers | Loading, Empty, Error |
CometChatGroups | Loading, Empty, Error |
CometChatGroupMembers | Loading, Empty, Error |
CometChatCallLogs | Loading, Empty, Error |
CometChatMessageList | Loading, Empty, Error |
Related
- Customization Overview — See all customization categories.
- View Slots — Replace specific regions of list items.