Is there any way to achieve this kind of ordered l...
# compose
u
Is there any way to achieve this kind of ordered list of text? Please notice the varied spacing between the numbers and the text.
f
Maybe something like
Copy code
Row {
  Column {
    // all the numbers
  }
  Column {
    // all the text
  }
}
d
I suggest you to make function for your list item with specified width for number, something like this:
Copy code
@Composable
fun ListItem(number: Int, text: String) {
    Row {
        Text(
            modifier = Modifier.width(30.dp),
            text = number.toString()
        )
        Text(text = text)
    }
}
u
@Felix Schütz Thought of same but I wonder how to handle the cases when some items are multi-lined?
z
🙏 1
u