OnSelectedDelegate

public interface OnSelectedDelegate

androidx.car.app.model.OnSelectedDelegate


A host-side delegate for sending ItemList.OnSelectedListener events to the car app.

Summary

Public methods

abstract void sendSelected(int selectedIndex, OnDoneCallback callback)

Notifies that an item was selected.

Public methods

sendSelected

public abstract void sendSelected (int selectedIndex, 
                OnDoneCallback callback)

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 int: the index of the selected item

callback OnDoneCallback: the OnDoneCallback to trigger when the client finishes handling the event