# Mention List

`MentionListView` is a UI Component that shows previews of messages that contain mentions of the current user.

| Light Mode                                                                      | Dark Mode                                                                     |
| ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| ![Light mode](@chat-sdk/android/v6-latest/_assets/mentions_list_view_light.png) | ![Dark mode](@chat-sdk/android/v6-latest/_assets/mentions_list_view_dark.png) |

## Usage

You can add this View via XML:

```xml
<io.getstream.chat.android.ui.feature.mentions.list.MentionListView
    android:id="@+id/mentionsListView"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />
```

We recommend using this view with its [ViewModel](/chat/docs/sdk/android/ui/overview#viewmodels/), which supplies it with data from the Stream API.

The basic setup of the ViewModel and connecting it to the View is done the following way:

<tabs>

<tabs-item value="kotlin" label="Kotlin">

```kotlin
val viewModel: MentionListViewModel by viewModels()
viewModel.bindView(mentionListView, viewLifecycleOwner)
```

</tabs-item>

<tabs-item value="java" label="Java">

```java
MentionListViewModel viewModel = new ViewModelProvider(this).get(MentionListViewModel.class);
MentionListViewModelBinding.bind(viewModel, mentionListView, getViewLifecycleOwner());
```

</tabs-item>

</tabs>

From that point, you should be able to see messages which contain mentions of the current user.

<admonition type="note">

`bindView` sets listeners on the View and the ViewModel. Any additional listeners should be set _after_ calling `bindView`.

</admonition>

## Handling Actions

`MentionListView` allows you to configure certain actions on it:

<tabs>

<tabs-item value="kotlin" label="Kotlin">

```kotlin
mentionListView.setMentionSelectedListener { message ->
    // Handle a mention item being clicked
}
```

</tabs-item>

<tabs-item value="java" label="Java">

```java
mentionListView.setMentionSelectedListener(message -> {
    // Handle a mention item being clicked
});
```

</tabs-item>

</tabs>

The full list of available listeners is available [here](https://getstream.github.io/stream-chat-android/stream-chat-android-ui-components/io.getstream.chat.android.ui.feature.mentions.list/-mention-list-view/).

---

This page was last updated at 2025-08-15T14:15:38.001Z.

For the most recent version of this documentation, visit [https://getstream.io/chat/docs/sdk/android/ui/utility-components/mention-list/](https://getstream.io/chat/docs/sdk/android/ui/utility-components/mention-list/).