PHondogo
09/08/2021, 12:00 PMRob Meeuwisse
09/08/2021, 12:53 PMonDispose
lambda is called when the Composable leaves the composition. I.e. put something like this on the screen/widget where you want to close the keyboard when the screen/widget is closed.
val textInputService = LocalTextInputService.current
DisposableEffect(Unit) {
onDispose {
textInputService.hideSoftwareKeyboard()
}
}
PHondogo
09/09/2021, 6:08 AM