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

Luis Daivid

08/03/2022, 5:41 AM
Keyboard ime does not change when focus is changed to another text field. For eaxample, There is A TextField whose ime is
Search
, and there is B TextField whose ime is
Next
. If you click A, ime is displayed as Search, but if you click B while the keyboard is shown, it is still
Search
ime. Is this Compose bug? or There any way to solve it?
c

Colton Idle

08/03/2022, 12:38 PM
Hm. I definitely have this working where textfields are set to Next, and then the last field is set to Done and it works fine. do you have a small repro? i can try on my side
l

Luis Daivid

08/03/2022, 1:58 PM
@Colton Idle no repo. but very simple code here.
Copy code
var myValue by remember { mutableStateOf("") }
TextField(
    value = myValue,
    onValueChange = { myValue = it },
    keyboardOptions = KeyboardOptions(imeAction = ImeAction.Search))

TextField(
    value = myValue,
    onValueChange = { myValue = it },
    keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next))
6 Views