https://kotlinlang.org logo
#compose
Title
# compose
k

K Merle

09/24/2021, 5:30 AM
It seems that due to animation during orientation change (from portrait to landscape)
focusRequester.requestFocus()
does not open the keyboard. Adding a 300ms delay does solve the issue it seems. Anyone faces the same issue and were you able to solve it better? I'd like to avoid delay.
Copy code
LaunchedEffect(Unit) {
    delay(300)
    focusRequester.requestFocus()
}
s

saket

09/24/2021, 6:54 AM
k

K Merle

09/24/2021, 6:57 AM
I think it is, the only difference is that I am able to get initial focus every time and open the keyboard. It's just that orientation change does not open the keyboard without delay.
4 Views