I would like to put a `Text` below a `Slider` . My...
# compose
l
I would like to put a
Text
below a
Slider
. My first approach was to wrap the slider in a
Column
and put the text below the slider but this occupies too much height. I want to use the composable as an item in a
LazyList
so I came up with the idea to wrap the slider and the text in a
Box
and use an offset for the text but this does not occupy the overextending space. How can I achieve this while not occupying too much height?
Copy code
Box(modifier = Modifier.fillMaxWidth()) {
            Slider(
                modifier = Modifier
                    .fillMaxWidth()
                    .then(modifier),
                value = value,
                onValueChange = onValueChange,
                valueRange = valueRange,
            )
            Row(
                modifier = Modifier
                    .fillMaxWidth()
                    .offset(y = 32.dp)
                    .padding(horizontal = P8, vertical = P2),
                horizontalArrangement = Arrangement.SpaceBetween,
            ) {
                Text(modifier = Modifier, text = valueRange.start.int.toString())
                Text(modifier = Modifier, text = valueRange.endInclusive.int.toString())
            }
        }