JaviMar
JaviMar

Reputation: 633

Compose Rows one after another wrapping around

Good day,

I am trying to achieve this in Compose but no luck. I have the composable (ItemActivity) ready that has to repeat N times, it is just a checkbox and a string -> I have a random string generator to simulate differente lengths for this.

enter image description here

This is my trying, but all I get is one below the other. I want as in this picture, no horizontal scroll, just wrapping ...


    LazyHorizontalStaggeredGrid(
        modifier = modifier.fillMaxSize(),
        rows = StaggeredGridCells.Fixed(activities),
        horizontalItemSpacing = 8.dp,
        verticalArrangement = Arrangement.spacedBy(8.dp)
    ) {
        items(activities) {
            ItemActivity(
                filterCheck = filterCheck,
                filterName = getRandomString()
            )
        }
    }

Thanks for the attention.

Upvotes: 0

Views: 138

Answers (0)

Related Questions