Component-Level Callbacks
Click Callbacks
- Kotlin
- Java
Error Callback
UsesetOnError to handle component-level errors:
- Kotlin
- Java
Selection Mode
Enable single or multi-select on list components:- Kotlin
- Java
Global Events
Global events are fired by the UI Kit when actions happen anywhere in the app. Register listeners using the static listener registration methods on each event class (addListener, addGroupListener, or addUserListener depending on the class).
Each listener is registered with a unique
String tag so it can be removed later.
Component-Level vs Global Events
- Component-level callbacks (e.g.,
setOnItemClick) are set on a specific View instance and only fire for that component. - Global events (e.g.,
CometChatMessageEvents.addListener) are static and fire regardless of which component triggered the action. Use them for cross-component coordination.
- Kotlin
- Java
Related
- Events Reference — Full list of all event classes and their methods.
- Customization Overview — See all customization categories.