StavFX
07/02/2024, 4:06 PM.focusProperties
to do anything on a Column, but works fine on a LazyColumn.
Among other things, I tried adding .focusGroup()
on the Column, and/or .focusTarget() on the children, but looks like there's something I'm not getting about the difference between Col and LazyCol.
Is there a way to make to get Column to work with focus modifiers? (focusRestorer is what I'm eventually actually after)Zach Klippenstein (he/him) [MOD]
07/02/2024, 4:59 PMStavFX
07/02/2024, 5:01 PMLouis Pullen-Freilich [G]
07/02/2024, 5:25 PMStavFX
07/02/2024, 5:27 PM.focusRestorer()
so that child elements restore focus properlyLouis Pullen-Freilich [G]
07/02/2024, 5:30 PMModifier.focusRestorer().focusGroup()
should work in this caseStavFX
07/02/2024, 5:35 PMStavFX
07/02/2024, 5:38 PMStavFX
07/02/2024, 5:41 PMRow {
Column(Modifier.focusRestorer().focusGroup()) {
repeat(4) {
Surface(onClick = {}) { Text(text = "row $it") }
}
}
Button(onClick = { /*TODO*/ }) {
Text("other row")
}
}
But I guess now I'm having more specific issues related to the fact I'm trying to put all this inside <http://androidx.tv|androidx.tv>.material3.ModalNavigationDrawer