OnSelectedDelegate


@CarProtocol
interface OnSelectedDelegate


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

Summary

Public functions

Unit
sendSelected(selectedIndex: Int, callback: OnDoneCallback)

Notifies that an item was selected.

Public functions

sendSelected

Added in 1.0.0
fun sendSelected(selectedIndex: Int, callback: OnDoneCallback): Unit

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