How would I fit a label indicating the current val...
# compose
z
How would I fit a label indicating the current value to the right of a slider from the material 3 lib?
e
I've not played too much with the M3 liv yet, but does a
Row { Slider, Text }
work?
z
No, the slider just fills the entire space
e
Have you tried assigning a weight to the slider? with e.g.
Modifier.weight(1f)
r
https://issuetracker.google.com/u/1/issues/248164773 has a workaround, although I don’t know how much control you’ll have over spacing: wrap the
Slider
in
Box(modifier = Modifier.weight(1f))
z
This works, thank you
r
This appears fixed in Material 3 1.0.0-rc01.