focusChanges
Create a InitialValueFlow of focus changed events on the View instance, where the value emitted indicates whether the View has focus.
Note: Created flow keeps a strong reference to the View instance until the coroutine that launched the flow collector is cancelled.
Example of usage:
view.focusChanges()
.onEach {
// handle view focus changed
}
.launchIn(uiScope)
Content copied to clipboard