I have a pretty simple layout with three TextField...
# compose
t
I have a pretty simple layout with three TextFields in a Column, the first two set up with
ImeAction.Next
. Should tapping the IME action just do the right thing and focus the next field, or do I need to set this up manually with FocusRequester and KeyboardActions?
2
Also I thought this worked before, but it doesn't seem to be working automatically on beta09.
m
I don't think it works automatically in compose (yet?)
l
It seems that
ImeAction.Next
is not handled automatically; I struggled with the same problem.
Copy code
// If no custom focus traversal order is specified, perform a search for the appropriate item
// to move focus to.
val nextNode = when (focusDirection) {
    Next, Previous -> null // TODO(b/170155659): Perform one dimensional focus search.
    Left, Right, Up, Down -> twoDimensionalFocusSearch(focusDirection)
You need to set these things manually with
focusOrder
. However If you use
Down
and etc, you only need to implement
keyboardActions
.
m
I've tried using IME actions, didn't work, so I created focusRequesters and set Key events to trigger the necessary focus request. (Compose Desktop)