Home > Net >  dotted (Unordered) list in jetpack compose
dotted (Unordered) list in jetpack compose

Time:01-18

How can I make a dotted list in jetpack compose in the simplest way possible? an example of what I meant: enter image description here

CodePudding user response:

You can use something like:

val itemsList = (0..5).toList() //just an example

Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
    itemsList.forEach() {
        Row(
            verticalAlignment = Alignment.CenterVertically,
        ) {
            Box(
                modifier = Modifier
                    .padding(start = 16.dp, end = 8.dp)
                    .size(8.dp)
                    .background(Color.Black, shape = CircleShape),
            )

            Text("Text Text $it")
        }
    }
}

enter image description here

  • Related