# ItemList.OnItemVisibilityChangedListener

Artifact: [androidx.car.app:app](https://developer.android.com/jetpack/androidx/releases/car-app) [View Source](https://cs.android.com/search?q=file:androidx/car/app/model/ItemList.java+class:androidx.car.app.model.ItemList.OnItemVisibilityChangedListener) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

*** ** * ** ***


```
public interface ItemList.OnItemVisibilityChangedListener
```

<br />

*** ** * ** ***

A listener for handling item visibility changes.

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/car/app/model/ItemList.OnItemVisibilityChangedListener#onItemVisibilityChanged(int,int)(int startIndex, int endIndex)` Notifies that the items in the list within the specified indices have become visible. |

## Public methods

### onItemVisibilityChanged

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

```
abstract void onItemVisibilityChanged(int startIndex, int endIndex)
```

Notifies that the items in the list within the specified indices have become visible.

The start index is inclusive, and the end index is exclusive. For example, if only the first item in a list is visible, the start and end indices would be 0 and 1, respectively.

| Parameters |
|---|---|
| `int startIndex` | the index of the first item that is visible |
| `int endIndex` | the index of the first item that is not visible after the visible range |