Josh Feinberg
07/17/2023, 10:52 PMFlowRow
is still experimental, is there support for it to have vertical scrolling?Josh Feinberg
07/17/2023, 10:53 PMFlowRow(Modifier.verticalScroll(scrollState)) {
repeat(500) {
val color = when (it % 4) {
0 -> Color.Green
1 -> Color.Black
2 -> Color.Cyan
else -> Color.White
}
Box(Modifier.width(100.dp).height(100.dp).background(color))
}
}
but it doesn't seem to scroll despite those boxes going way off screenJosh Feinberg
07/17/2023, 10:53 PMnestedScroll
but I also can't seem to get that working properlyStylianos Gakis
07/17/2023, 10:55 PMAbhimanyu
07/17/2023, 10:56 PMAbhimanyu
07/17/2023, 11:00 PMAbhimanyu
07/17/2023, 11:01 PM@OptIn(ExperimentalLayoutApi::class)
@Composable
fun FlowRowDemo() {
FlowRow(
Modifier.verticalScroll(rememberScrollState()),
) {
repeat(500) {
Text(
text = animalNames[it % animalNames.size],
modifier = Modifier.padding(
16.dp,
),
)
}
}
}
animalNames
is a list of strings.Josh Feinberg
07/17/2023, 11:13 PM