我正在使用 Jetpack ComposeTextField
,当用户按下操作按钮(imeActionPerformed
参数)时,我想关闭虚拟键盘。
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 }
)