julioromano
04/07/2021, 9:30 PMLocalSoftwareKeyboardControllerAndroidViewAndroidViewAndroidViewit.requestFocus()keyboardController?.show()it.requestFocus()focusRequesterfocusRequester.requestFocus()Ralston Da Silva
04/09/2021, 12:00 AM@Composable
fun EditTextInteropDemo(){
    AndroidView({ 
        EditText(it).apply{
            postDelayed({ requestFocus(); showKeyboard() }, 100)
        }
    })
}
fun View.showKeyboard(){
    val InputMethodManager = context.getSystemService(Context.INPUT_METHOD_SERVICE)
    if(InputMethodManager is InputMethodManager){
        InputMethodManager.showSoftInput(this, SHOW_IMPLICIT)
    }
}julioromano
04/09/2021, 7:14 AMInputMethodManagerLocalSoftwareKeyboardControllerFocusRequesterSean McQuillan [G]
04/09/2021, 4:22 PMSean McQuillan [G]
04/09/2021, 4:23 PMjulioromano
04/12/2021, 7:08 AMI’ll open a bug https://issuetracker.google.com/issues/184947932 (edited)Access denied. Perhaps it’s been created as an internal only bug?
Sean McQuillan [G]
04/12/2021, 5:13 PMSean McQuillan [G]
04/12/2021, 5:16 PMjulioromano
04/13/2021, 3:20 PMjava.lang.IllegalStateException: FocusRequester is not initialized. One reason for this is that you requesting focus changes during composition. Focus requesters should not be made during composition, but should be made in response to some event.
        at androidx.compose.ui.focus.FocusRequester.requestFocus(FocusRequester.kt:45)FocusRequester.requestFocus()FocusRequester.requestFocus()