public interface

ItemList.OnSelectedListener

 androidx.car.app.model.ItemList.OnSelectedListener

Overview

A listener for handling selection events for lists with selectable items.

Summary

Methods
public voidonSelected(int selectedIndex)

Notifies that an item was selected.

Methods

public void onSelected(int selectedIndex)

Notifies that an item was selected.

This event is called even if the selection did not change, for example, if the user selected an already selected item.

Parameters:

selectedIndex: the index of the newly selected item