diff options
author | Connie Shi <connieshi@google.com> | 2024-05-18 14:06:20 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-05-18 14:06:20 +0000 |
commit | 89ec14e39cf771106a8719337062572717cbad31 (patch) | |
tree | 159ac63129e2438f46767364fd31eb5693b94d54 | |
parent | c7b620bf84a4ed8f75bc09b1a568abbde14da84d (diff) | |
parent | 760eb1b7f2a8d2ac36cf5629e7c48b7b4d00aa28 (diff) | |
download | support-androidx-main.tar.gz |
Merge "Update custom slider thumb + label samples so that the text inside the label will scale based on the display / text size of the device." into androidx-mainandroidx-main
-rw-r--r-- | compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/SliderSamples.kt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/SliderSamples.kt b/compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/SliderSamples.kt index d763b896bcd..02a38021883 100644 --- a/compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/SliderSamples.kt +++ b/compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/SliderSamples.kt @@ -25,6 +25,7 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.requiredSize import androidx.compose.foundation.layout.requiredSizeIn import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.sizeIn import androidx.compose.foundation.layout.wrapContentWidth import androidx.compose.foundation.shape.CircleShape import androidx.compose.material.icons.Icons @@ -167,7 +168,7 @@ fun SliderWithCustomThumbSample() { label = { PlainTooltip( modifier = Modifier - .requiredSize(45.dp, 25.dp) + .sizeIn(45.dp, 25.dp) .wrapContentWidth() ) { Text("%.2f".format(sliderPosition)) @@ -396,7 +397,7 @@ fun RangeSliderWithCustomComponents() { label = { PlainTooltip( modifier = Modifier - .requiredSize(45.dp, 25.dp) + .sizeIn(45.dp, 25.dp) .wrapContentWidth() ) { Text("%.2f".format(rangeSliderState.activeRangeStart)) |