> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-rn-guide-message-privately.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Browse all prebuilt UI components in the CometChat Android UI Kit — conversations, messages, users, groups, calls, search, and AI.

<Accordion title="AI Integration Quick Reference">
  | Field            | Value                                                                             |
  | ---------------- | --------------------------------------------------------------------------------- |
  | Package          | `com.cometchat:chat-uikit-android`                                                |
  | Required setup   | `CometChatUIKit.init()` + `CometChatUIKit.login()` before rendering any component |
  | Callback actions | `.setOn<Event> { }` or `.setOn<Event>(listener)`                                  |
  | Data filtering   | `.set<Entity>RequestBuilder(builder)`                                             |
  | Toggle features  | `.set<Feature>Visibility(View.VISIBLE / View.GONE)`                               |
  | Custom rendering | `.set<Slot>View(ViewHolderListener)` or `.set<Slot>View(@LayoutRes int)`          |
  | Style overrides  | `.setStyle(@StyleRes int)` targeting `CometChat<Component>Style`                  |
  | Calling          | Requires separate `com.cometchat:calls-sdk-android` package                       |
</Accordion>

## Architecture

The UI Kit is a set of independent Android Views that compose into chat layouts. A typical chat layout uses four core components:

* `CometChatConversations` — list of recent conversations (users and groups)
* `CometChatMessageHeader` — toolbar showing avatar, name, online status, and typing indicator
* `CometChatMessageList` — scrollable message feed with reactions, receipts, and threads
* `CometChatMessageComposer` — rich input with attachments, mentions, and voice notes

Data flow: selecting a conversation in `CometChatConversations` yields a `User` or `Group` object via `setOnItemClick`. That object is passed to `CometChatMessageHeader`, `CometChatMessageList`, and `CometChatMessageComposer` using `.setUser()` or `.setGroup()`. The message components use the SDK internally — `CometChatMessageComposer` sends messages, `CometChatMessageList` receives them via real-time listeners.

Components communicate through a publish/subscribe event bus (`CometChatMessageEvents`, `CometChatConversationEvents`, `CometChatGroupEvents`, etc.). A component emits events that other components or application code can subscribe to without direct references. See [Events](/ui-kit/android/events) for the full list.

Each component accepts callback methods (`.setOn<Event>`), view slot methods (`.set<Slot>View`) for replacing UI sections, `RequestBuilder` methods for data filtering, and `@StyleRes` overrides via `.setStyle()`.

***

## Component Catalog

All components are from the `com.cometchat:chat-uikit-android` package.

### Conversations and Lists

| Component              | Purpose                                 | Key Methods                                                      | Page                                           |
| ---------------------- | --------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------- |
| CometChatConversations | Scrollable list of recent conversations | `setConversationsRequestBuilder`, `setOnItemClick`, `setOnError` | [Conversations](/ui-kit/android/conversations) |
| CometChatUsers         | Scrollable list of users                | `setUsersRequestBuilder`, `setOnItemClick`, `setOnError`         | [Users](/ui-kit/android/users)                 |
| CometChatGroups        | Scrollable list of groups               | `setGroupsRequestBuilder`, `setOnItemClick`, `setOnError`        | [Groups](/ui-kit/android/groups)               |
| CometChatGroupMembers  | Scrollable list of group members        | `setGroup`, `setGroupMembersRequestBuilder`, `setOnItemClick`    | [Group Members](/ui-kit/android/group-members) |

### Messages

| Component                       | Purpose                                                                     | Key Methods                                                                 | Page                                                                 |
| ------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| CometChatMessageHeader          | Toolbar with avatar, name, status, typing indicator                         | `setUser`, `setGroup`, `setOnBackButtonPressed`                             | [Message Header](/ui-kit/android/message-header)                     |
| CometChatMessageList            | Scrollable message list with reactions, receipts, threads                   | `setUser`, `setGroup`, `setMessagesRequestBuilder`                          | [Message List](/ui-kit/android/message-list)                         |
| CometChatMessageComposer        | Rich input with attachments, mentions, voice notes                          | `setUser`, `setGroup`, `setOnSendButtonClick`                               | [Message Composer](/ui-kit/android/message-composer)                 |
| CometChatCompactMessageComposer | Compact input with rich text formatting, inline voice recorder, attachments | `setUser`, `setGroup`, `setEnterKeyBehavior`, `setEnableRichTextFormatting` | [Compact Message Composer](/ui-kit/android/compact-message-composer) |
| CometChatThreadHeader           | Parent message bubble and reply count for threaded view                     | `setParentMessage`                                                          | [Threaded Messages Header](/ui-kit/android/threaded-messages-header) |

### Calling

| Component             | Purpose                                       | Key Methods                                                         | Page                                           |
| --------------------- | --------------------------------------------- | ------------------------------------------------------------------- | ---------------------------------------------- |
| CometChatCallButtons  | Voice and video call initiation buttons       | `setUser`, `setGroup`, `setOnVoiceCallClick`, `setOnVideoCallClick` | [Call Buttons](/ui-kit/android/call-buttons)   |
| CometChatIncomingCall | Incoming call notification with accept/reject | `setCall`, `setOnAcceptClick`, `setOnRejectClick`                   | [Incoming Call](/ui-kit/android/incoming-call) |
| CometChatOutgoingCall | Outgoing call screen with end-call control    | `setCall`, `setOnEndCallClick`                                      | [Outgoing Call](/ui-kit/android/outgoing-call) |
| CometChatCallLogs     | Scrollable list of call history               | `setCallLogRequestBuilder`, `setOnItemClick`                        | [Call Logs](/ui-kit/android/call-logs)         |

### Search and AI

| Component                       | Purpose                                            | Key Methods                                                            | Page                                                                   |
| ------------------------------- | -------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| CometChatSearch                 | Real-time search across conversations and messages | `setOnConversationClicked`, `setOnMessageClicked`, `setUid`, `setGuid` | [Search](/ui-kit/android/search)                                       |
| CometChatAIAssistantChatHistory | AI assistant conversation history                  | `setOnItemClickListener`, `setOnNewChatClickListener`                  | [AI Assistant Chat History](/ui-kit/android/ai-assistant-chat-history) |

***

## Component API Pattern

All components share a consistent API surface.

### Actions

Actions control component behavior. They split into two categories:

Predefined actions are built into the component and execute automatically on user interaction (e.g., tapping send dispatches the message). No configuration needed.

User-defined actions are callback methods that fire on specific events. Override them to customize behavior:

<Tabs>
  <Tab title="Kotlin">
    ```kotlin lines theme={null}
    messageList.setOnThreadRepliesClick { message, context, view ->
        openThreadPanel(message)
    }
    messageList.setOnError { error ->
        logError(error)
    }
    ```
  </Tab>

  <Tab title="Java">
    ```java lines theme={null}
    messageList.setOnThreadRepliesClick((message, context, view) -> {
        openThreadPanel(message);
    });
    messageList.setOnError(error -> {
        logError(error);
    });
    ```
  </Tab>
</Tabs>

### Events

Events enable decoupled communication between components. A component emits events that other parts of the application can subscribe to without direct references.

<Tabs>
  <Tab title="Kotlin">
    ```kotlin lines theme={null}
    CometChatMessageEvents.addListener("LISTENER_ID", object : CometChatMessageEvents() {
        override fun ccMessageSent(message: BaseMessage, status: Int) {
            // react to sent message
        }
    })

    // cleanup
    CometChatMessageEvents.removeListener("LISTENER_ID")
    ```
  </Tab>

  <Tab title="Java">
    ```java lines theme={null}
    CometChatMessageEvents.addListener("LISTENER_ID", new CometChatMessageEvents() {
        @Override
        public void ccMessageSent(BaseMessage message, int status) {
            // react to sent message
        }
    });

    // cleanup
    CometChatMessageEvents.removeListener("LISTENER_ID");
    ```
  </Tab>
</Tabs>

Each component page documents its emitted events in the Events section.

### Filters

List-based components accept `RequestBuilder` methods to control which data loads:

<Tabs>
  <Tab title="Kotlin">
    ```kotlin lines theme={null}
    messageList.setMessagesRequestBuilder(
        MessagesRequest.MessagesRequestBuilder().setLimit(20)
    )
    ```
  </Tab>

  <Tab title="Java">
    ```java lines theme={null}
    messageList.setMessagesRequestBuilder(
        new MessagesRequest.MessagesRequestBuilder().setLimit(20)
    );
    ```
  </Tab>
</Tabs>

### Custom View Slots

Components expose named view slot methods to replace sections of the default UI:

<Tabs>
  <Tab title="Kotlin">
    ```kotlin lines theme={null}
    messageHeader.setTitleView { context, user, group ->
        // return custom View
    }
    messageHeader.setSubtitleView { context, user, group ->
        // return custom View
    }
    ```
  </Tab>

  <Tab title="Java">
    ```java lines theme={null}
    messageHeader.setTitleView((context, user, group) -> {
        // return custom View
    });
    messageHeader.setSubtitleView((context, user, group) -> {
        // return custom View
    });
    ```
  </Tab>
</Tabs>

### Style Overrides

Every component supports a `setStyle(@StyleRes int)` method for style customization:

```xml styles.xml lines theme={null}
<style name="CustomConversationsStyle" parent="CometChatConversationsStyle">
    <item name="cometchatSeparatorColor">@color/your_color</item>
</style>
```

See [Component Styling](/ui-kit/android/component-styling) for the full styling guide.

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Core Features" icon="comments" href="/ui-kit/android/core-features">
    Chat features included out of the box
  </Card>

  <Card title="Theming" icon="paintbrush" href="/ui-kit/android/theme-introduction">
    Customize colors, fonts, and styles
  </Card>

  <Card title="Extensions" icon="puzzle-piece" href="/ui-kit/android/extensions">
    Add-on features like polls, stickers, and translation
  </Card>

  <Card title="Guides" icon="book" href="/ui-kit/android/guide-overview">
    Task-oriented tutorials for common patterns
  </Card>
</CardGroup>
