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

natario1

02/16/2021, 12:01 PM
How do I request focus for a composable as soon as it enters composition?
LaunchedEffect works but I'm not sure if it's the right way.
j

JulianK

02/16/2021, 1:27 PM
As far as read the conversations here, there is no right way. https://kotlinlang.slack.com/archives/CJLTWPH7S/p1611389933117700
t

Timo Drick

02/17/2021, 11:00 AM
Replacement of onActive is DisposableEffect. But the problems with the softkeyboard and focus can not be solved with this. I do also have massive problems getting BasicTextField and also TextField working as expected. In the Android legacy view system it was a pain to get everything right and in compose it was not possible at all in the past. Now it is improving but far away from reliable behavior.
2 Views