I want get the keyboard input in my custom compose?But even i can't show a keybord.
Anyone know how to use it ?help please.
@Composable
fun SmsCodeCompose(onCompleted:(String)->Unit) {
val textInputService = LocalTextInputService.current
Text(text = "12112",
modifier=Modifier.clickable {
Timber.d("input service= $textInputService")
val textInputSession = textInputService?.startInput(
value = TextFieldValue(),
imeOptions = ImeOptions(),
onEditCommand = {it-> it.forEach{
Timber.d("$it")
}
},
onImeActionPerformed = {}
)
textInputSession?.showSoftwareKeyboard()
}.focusable(true))