I'm using a `FocusRequester` to provide focus to a...
# compose
e
I'm using a
FocusRequester
to provide focus to a
TextField
and open the keyboard when a screen opens using this code:
Copy code
remember { FocusRequester() }.apply {
    LaunchedEffect(Unit) {
      requestFocus()
    }
}
This works fine, except on API 27 where the keyboard doesn't show. Is this a known issue?
c
Only on 27? What about 26 or 28?
e
As far as I can tell just 27. I'm gonna test again later
c
Try adding a delay of 300 ms and see if it works
e
I'll try that, thanks
That seems to do the trick, thanks!
c
Yeah it’s a bit of a hack, but I have something similar in my app. It works around some keyboard issues