saket
09/12/2021, 6:44 AMSoftwareKeyboardController#show
doesn’t work super reliably for their composable? I’m using it to auto-show the keyboard when a dialog is shown but I’m forced to use a small delay. I was wondering how are others showing keyboard?
val keyboardController = LocalSoftwareKeyboardController.current
val requester = remember { FocusRequester() }
TextField(
modifier = Modifier.focusRequester(requester),
value = ...,
onValueChange = ...
)
LaunchedEffect(Unit) {
delay(50)
focusRequester.requestFocus()
keyboardController?.show()
}
Zach Klippenstein (he/him) [MOD]
09/12/2021, 11:46 AMsaket
09/12/2021, 10:21 PM