Does anyone knows how can I show or hide the keyboard inside AlertDialog?
The focusManager.clearFocus() doesn't work inside AlertDialog.
Same for textInputService?.hideSoftwareKeyboard() and softwareKeyboardController?.hide().
For example:
AlertDialog(
onDismissRequest = {
openDialog.value = false
},
text = {
TextField(...)
}
buttons = {
Button(
modifier = Modifier.fillMaxWidth(),
onClick = { focusManager.clearFocus() }
) {
Text("Update")
}
}
)