> ## 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.

# Customization Overview

> Understand the View + ViewModel + Adapter architecture and discover all customization entry points in the CometChat Android UI Kit.

Every component in the Android UI Kit follows a three-layer architecture. Understanding these layers is the key to unlocking deep customization without rebuilding components from scratch.

## Architecture

Each component is composed of three collaborating classes:

| Layer     | Role                                                                                    | Example Class            |
| --------- | --------------------------------------------------------------------------------------- | ------------------------ |
| View      | Renders the UI, handles user interaction, and exposes setter methods for customization. | `CometChatConversations` |
| ViewModel | Manages data fetching, state, and business logic via `LiveData`.                        | `ConversationsViewModel` |
| Adapter   | Binds data to `RecyclerView` items and controls how each list row is rendered.          | `ConversationsAdapter`   |

```mermaid theme={null}
graph LR
    V["CometChatConversations\n(View Layer)"] -->|getViewModel()| VM["ConversationsViewModel\n(ViewModel Layer)"]
    V -->|getConversationsAdapter()| A["ConversationsAdapter\n(Adapter Layer)"]
    V -->|getRecyclerView()| RV["RecyclerView"]
    V -->|getBinding()| B["ViewBinding"]
    VM -->|LiveData| V
    A -->|ViewHolder| RV
```

## Accessing Internal Layers

The View layer provides accessor methods to reach the other layers:

| Method                      | Returns                                 | Purpose                                                                                                 |
| --------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| `getViewModel()`            | `ConversationsViewModel`                | Access the ViewModel to observe `LiveData`, call mutation methods, or configure request builders.       |
| `getConversationsAdapter()` | `ConversationsAdapter`                  | Access the Adapter to manipulate list data or set view slots directly on the adapter.                   |
| `getRecyclerView()`         | `RecyclerView`                          | Access the underlying `RecyclerView` for scroll listeners, layout manager changes, or item decorations. |
| `getBinding()`              | `CometchatConversationsListViewBinding` | Access the ViewBinding for direct manipulation of the component's internal views.                       |

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val conversations = CometChatConversations(context)

    // Access the ViewModel
    val viewModel = conversations.getViewModel()

    // Access the Adapter
    val adapter = conversations.getConversationsAdapter()

    // Access the RecyclerView
    val recyclerView = conversations.getRecyclerView()
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    CometChatConversations conversations = new CometChatConversations(context);

    // Access the ViewModel
    ConversationsViewModel viewModel = conversations.getViewModel();

    // Access the Adapter
    ConversationsAdapter adapter = conversations.getConversationsAdapter();

    // Access the RecyclerView
    RecyclerView recyclerView = conversations.getRecyclerView();
    ```
  </Tab>
</Tabs>

## Customization Categories

The UI Kit provides eight categories of customization entry points. Each category has a dedicated guide:

<CardGroup cols={2}>
  <Card title="View Slots" href="/ui-kit/android/customization-view-slots">
    Replace specific regions of a component's UI (leading view, title, subtitle, trailing view) using the ViewHolderListener pattern.
  </Card>

  <Card title="Styles" href="/ui-kit/android/customization-styles">
    Customize visual appearance using XML theme attributes or programmatic setter methods on the View layer.
  </Card>

  <Card title="ViewModel & Data" href="/ui-kit/android/customization-viewmodel-data">
    Configure data fetching with RequestBuilders, observe LiveData, and call mutation methods on the ViewModel.
  </Card>

  <Card title="Adapters" href="/ui-kit/android/customization-adapters">
    Access or replace the RecyclerView Adapter to control how list items are rendered and manage list data.
  </Card>

  <Card title="Events & Callbacks" href="/ui-kit/android/customization-events">
    Handle click events, selection mode, and global UI Kit events with component-level and static event listeners.
  </Card>

  <Card title="State Views" href="/ui-kit/android/customization-state-views">
    Replace or restyle the default empty, error, and loading state views with custom layouts.
  </Card>

  <Card title="Text Formatters" href="/ui-kit/android/customization-text-formatters">
    Create custom text processors for hashtags, mentions, links, or any pattern using the CometChatTextFormatter API.
  </Card>

  <Card title="Menu & Options" href="/ui-kit/android/customization-menu-options">
    Add, replace, or extend context menu actions and composer attachment options on components.
  </Card>
</CardGroup>

For global-level customization that spans across all message types and components, see the [DataSource & ChatConfigurator](/ui-kit/android/customization-datasource) guide.

## What's Next

If you're new to customization, start with [View Slots](/ui-kit/android/customization-view-slots) for quick UI changes, or [Styles](/ui-kit/android/customization-styles) to match your brand. For advanced use cases like custom message types or global behavior changes, head to [DataSource & ChatConfigurator](/ui-kit/android/customization-datasource).
