Sam
12/30/2020, 8:10 PMBasicTextField
often doesn’t bring up the keyboard when focused! When it malfunctions, the cursor is literally blinking, yet somehow the keyboard is not open. This happens on physical Pixel 4a in a release build that is deployed to the play store!
Since we are chat-based communities, this is critical. How is it even possible to get into this state, and are there any workarounds/hacks that can fix this reliability bug?Cyril Find
12/30/2020, 8:20 PMCyril Find
12/30/2020, 8:21 PMRow
clickable and using a focus requesterCyril Find
12/30/2020, 8:24 PMval focusRequester = remember { FocusRequester() }
Row(modifier = Modifier.clickable { focusRequester.requestFocus() }) {
BasicTextField(modifier = Modifier.focusRequester(focusRequester))
}
Sam
12/30/2020, 8:33 PMSam
12/30/2020, 8:43 PMBox
that contains the BasicTextField
, I tried your technique of adding clickable to the Box
and requesting focus on the `BasicTextField`’s focusRequester
but i can still get into a blinking cursor state without software keyboard (so far tested in debug mode connected via usb)Cyril Find
12/30/2020, 8:44 PMSam
12/30/2020, 8:46 PMBox(modifier = modifier.clickable { focusRequester.requestFocus() }) {
if (value.text.isEmpty()) Text(placeholder)
BasicTextField(value = value, modifier = Modifier.focusRequester(focusRequester))
}
dimsuz
12/30/2020, 8:51 PMCyril Find
12/30/2020, 8:54 PMdimsuz
12/30/2020, 8:56 PMSam
12/30/2020, 8:56 PMandroid:windowSoftInputMode="stateAlwaysVisible"
Sam
12/30/2020, 8:58 PMdimsuz
12/30/2020, 9:11 PMSam
12/30/2020, 9:11 PMColton Idle
12/30/2020, 9:43 PMSam
12/30/2020, 9:53 PMColton Idle
12/30/2020, 9:54 PMColton Idle
12/30/2020, 9:54 PMColton Idle
12/30/2020, 9:55 PMSam
12/30/2020, 10:01 PMandroidx.navigation:navigation-compose:1.0.0-alpha04
does that also have to be changed?Sam
12/30/2020, 10:03 PMandroidx.compose.compiler.plugins.kotlin.IncompatibleComposeRuntimeVersionException: You are using an outdated version of Compose Runtime that is not compatible with the version of the Compose Compiler plugin you have installed. The compose compiler plugin you are using (version 1.0.0-alpha10) expects a minimum runtime version of 1.0.0-alpha10. The version of the runtime on the classpath currently is 1.0.0-alpha09
Colton Idle
12/30/2020, 10:05 PMSam
12/30/2020, 10:24 PMCyril Find
12/30/2020, 10:33 PMCyril Find
12/30/2020, 10:34 PMColton Idle
12/30/2020, 10:36 PMSam
12/30/2020, 10:46 PMCyril Find
12/30/2020, 10:49 PMSam
12/30/2020, 10:50 PMCyril Find
12/30/2020, 11:10 PMKshitij Patil
12/30/2020, 11:12 PMsavedInstanceState
to hoist the state of TextField
? I suspected it has to do with that and found that replacing savedInstanceState
with remember
seems to work sometimes. Could you give it a shot?Sam
12/30/2020, 11:14 PMvar textState by remember { mutableStateOf(TextFieldValue()) }
Sam
12/31/2020, 12:16 AMBox
I originally used for clickable
was very compact, so moving clickable to the parent Row
did the trick! Thank you so much!!Cyril Find
12/31/2020, 11:36 AMzoha131
01/04/2021, 8:31 AM