I have a Row I and in it I would like a Text() at ...
# compose
g
I have a Row I and in it I would like a Text() at its Start and another Text at its aligned to the end, how do I achieve that? Is there some documentation on alignments of that sort?
Managed!
Copy code
Row(horizontalArrangement = Arrangement.End) {
        Text(stringResource(id = field.label), modifier = Modifier.weight(1f))
        Text(
            text = field.startingValue.toString()
        )
    }
a
That'll do it 🙂 You could also add a
Spacer(Modifier.weight(1f))
between them if you prefer that mental model.
g
Thanks Adam, sounds better than my solution 🙂
a
Well, yes and no. Technically speaking having fewer layout nodes is cheaper, but in a case this focused it's probably negligible.
Serious hair splitting here 🙂