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

Utkarsh Tiwari

03/24/2022, 7:15 AM
Let’s say we have two focusable TextFields items stack in a column.
Copy code
Column {
  TextField() // Let's call it A
  TextField() // Let's call it B
}
If I use
FocusDirection.Down
when
A
is focused, the focus moves down to the
B
item below it which is an expected behavior. However, when I use
FocusDirection.Next
, nothing happens. The documentation of
FocusDirection.Next
says: Direction used in
FocusManager.moveFocus
to indicate that you are searching for the next focusable item.
and I believe that the next focusable item in the above column when
A
is in focus should be the
B
but it doesn’t seem to work. Am I missing something? 😕
c

Colton Idle

03/24/2022, 7:18 PM
If I have
Copy code
Column {
  TextField() // Let's call it A
  TextField() // Let's call it B
}
and I have keyboardOptions set to have Action.Next then the focus moves exactly as it should.
3 Views