Alex Styl
06/22/2025, 1:27 PMAlex Styl
06/22/2025, 1:28 PMfocusManager.move(Next)
on Key Event of the Column, or the Buttons and doesnt seem to be doing the trick.
The goal is to be able to jump from one GroupOfButtons to the next when pressing Tab on any of the buttons of the group (instead of having to go through the entire column)
The structure is this:
@Composable
fun GroupOfButtons(modifier: Modifier = Modifier) {
Column(
modifier = modifier.focusGroup()
) {
repeat(3) {
Button(onClick = { }) {
Text("1")
}
}
}
}
Row {
val leftRequester = remember { FocusRequester() }
val rightRequester = remember { FocusRequester() }
GroupOfButtons(
Modifier
.focusProperties {
next = rightRequester
}
.focusRequester(leftRequester)
)
GroupOfButtons(
Modifier
.focusProperties {
previous = leftRequester
}
.focusRequester(rightRequester)
)
}