selectionEvents

Create a InitialValueFlow of item selection events on the AdapterView instance where the value emitted is one of the 2 event types: AdapterViewSelectionEvent.ItemSelected, AdapterViewSelectionEvent.NothingSelected

Note: Created flow keeps a strong reference to the AdapterView instance until the coroutine that launched the flow collector is cancelled.

Example of usage:

adapterView.selectionEvents()
.onEach { event ->
// handle adapter view selection event
}
.launchIn(uiScope)