Tag list with Jetpack Compose on Android

Issue

I’m trying to create Composable like this:
enter image description here

I tried to use LazyVerticalGrid with GridCells.Adaptive(100.dp) but width of elements is fixed (100dp).
I need to have width of the element different for different text length and be able to see different amount of tags on a different cols of my grid.

Solution

Use FlowRow from Accompanist.

FlowRow(
    mainAxisSpacing = 16.dp,
) {
    // The Tag Composable comes here
}

Answered By – Abhimanyu

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published