diff --git a/sample/src/main/java/com/google/android/horologist/materialcomponents/SampleStepperScreen.kt b/sample/src/main/java/com/google/android/horologist/materialcomponents/SampleStepperScreen.kt index c9ee88f11c..bd81c19aaa 100644 --- a/sample/src/main/java/com/google/android/horologist/materialcomponents/SampleStepperScreen.kt +++ b/sample/src/main/java/com/google/android/horologist/materialcomponents/SampleStepperScreen.kt @@ -23,6 +23,7 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.wear.compose.material.Text import com.google.android.horologist.compose.material.Stepper +import kotlin.math.round @Composable internal fun SampleStepperScreen() { @@ -31,7 +32,7 @@ internal fun SampleStepperScreen() { } Stepper( value = value, - onValueChange = { value = it }, + onValueChange = { value = round(it) }, valueRange = 0f..100f, steps = 9, ) {