CometChatGroupMembers renders a scrollable list of all members in a specific group with real-time updates for membership changes, search, avatars, scope badges, and online/offline status indicators. Requires a Group object to load data.

Where It Fits
CometChatGroupMembers is a list component. It renders all members of a given group and emits the selected GroupMember via onItemClick. Use it inside a group detail screen or as a standalone member browser.
- Kotlin (XML Views)
- Jetpack Compose
activity_group_members.xml
Quick Start
- Kotlin (XML Views)
- Jetpack Compose
Add to your layout XML:Then set the group in your Activity:
CometChatUIKit.init(), a user logged in, and the UI Kit dependency added.
Or in a Fragment:
- Kotlin (XML Views)
- Jetpack Compose
Filtering Group Members
- Kotlin (XML Views)
- Jetpack Compose
Pass a
GroupMembersRequest.GroupMembersRequestBuilder to control what loads:Filter Recipes
Actions and Events
Callback Methods
onItemClick
Fires when a member row is tapped. Primary navigation hook.
- Kotlin (XML Views)
- Jetpack Compose
Replaces the default item-click behavior. Your custom lambda executes instead of the built-in navigation.
onItemLongClick
Fires when a member row is long-pressed. Use for additional actions like kick or ban.
- Kotlin (XML Views)
- Jetpack Compose
onBackPress
Fires when the user presses the back button in the toolbar.
- Kotlin (XML Views)
- Jetpack Compose
onSearchClick
Fires when the user taps the search icon in the toolbar.
- Kotlin (XML Views)
- Jetpack Compose
onSelection
Fires when members are selected/deselected in multi-select mode.
- Kotlin (XML Views)
- Jetpack Compose
onError
Fires on internal errors (network failure, auth issue, SDK exception).
- Kotlin (XML Views)
- Jetpack Compose
onLoad
Fires when the list is successfully fetched and loaded.
- Kotlin (XML Views)
- Jetpack Compose
onEmpty
Fires when the list is empty after loading.
- Kotlin (XML Views)
- Jetpack Compose
SDK Events (Real-Time, Automatic)
The component listens to these SDK events internally. No manual setup needed.Functionality
Custom View Slots
Leading View
Replace the avatar / left section.
- Kotlin (XML Views)
- Jetpack Compose
Title View
Replace the name / title text.
- Kotlin (XML Views)
- Jetpack Compose
Subtitle View
Replace the subtitle text below the member’s name.
- Kotlin (XML Views)
- Jetpack Compose
Trailing View
Replace the right section of each member item.
- Kotlin (XML Views)
- Jetpack Compose
Item View
Replace the entire list item row.
- Kotlin (XML Views)
- Jetpack Compose
State Views
- Kotlin (XML Views)
- Jetpack Compose
Overflow Menu
- Kotlin (XML Views)
- Jetpack Compose
Menu Options
- Kotlin (XML Views)
- Jetpack Compose
Common Patterns
Minimal list — hide all chrome
- Kotlin (XML Views)
- Jetpack Compose
Admins and moderators only
- Kotlin (XML Views)
- Jetpack Compose
Advanced Methods
Programmatic Selection
- Kotlin (XML Views)
- Jetpack Compose
ViewModel Access
- Kotlin (XML Views)
- Jetpack Compose
Style

- Kotlin (XML Views)
- Jetpack Compose
Define a custom style in
themes.xml:themes.xml
Style Properties
See Component Styling for the full reference.
Next Steps
Groups
Browse and search available groups
Conversations
Browse recent conversations
Component Styling
Detailed styling reference with screenshots
ViewModel & Data
Custom ViewModels, repositories, and ListOperations