I'm using the Jetpack Compose TextField
and I want to close the virtual keyboard when the user press the the action button (imeActionPerformed
parameter).
val text = +state { "" }
TextField(
value = text.value,
keyboardType = KeyboardType.Text,
imeAction = ImeAction.Done,
onImeActionPerformed = {
// TODO Close the virtual keyboard here <<<
}
onValueChange = { s -> text.value = s }
)