adjpd
08/21/2022, 10:48 PMTextField
at the bottom of the screen in a LazyColumn
the keyboard popups up momentarily, and then quickly disappears: you can't then enter input. Is this a known issue? Code in 🧵.adjpd
08/21/2022, 10:50 PMsetContent {
val items = mutableListOf<Int>().apply {
(1..100).forEach { add(it) }
}
LazyColumn {
items(items) { item ->
TextField("$item", {})
}
}
}
It's fine if you click on a TextField
at the top of the screen. But if you click on one at the bottom you get the aforementioned behaviour.
This happens in Compose 1.3.0 on the emulator and on a real device.Mia Clapham
08/21/2022, 11:06 PMMia Clapham
08/21/2022, 11:07 PMadjpd
08/21/2022, 11:24 PMadjpd
08/21/2022, 11:24 PMadjpd
08/21/2022, 11:29 PMMia Clapham
08/21/2022, 11:33 PMYou can check the log by executingcommand after enabling the developer option.adb shell dumpsys input_method
You need to find SoftInputShowHideHistory entries to find who is trying to show/hide the software keyboard and how. The meanings of reason fields can be found in this file.
Zoltan Demant
08/22/2022, 2:45 AMadjustResize
in android:windowSoftInputMode
might help. I think the list can automatically scroll to keep the focused field in view if you provide stable keys for the items as well.Zach Klippenstein (he/him) [MOD]
08/22/2022, 1:32 PMadjpd
08/22/2022, 4:13 PMadjustPan
and I could enter text at the bottom of the screen, and the list scrolled to the TextField