Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Attachment actions
Unintended behavior
View staffing
Description
Jetpack Compose component(s) used: androidx.compose.material3.Slider
Material3 version: 1.3.0
Android Studio Build: #AI-242.23339.11.2421.12550806
Kotlin version: 2.0.20
Steps to Reproduce or Code Sample to Reproduce:
1. Use StepsSliderSample with custom color for `activeTickColor` and `inactiveTickColor` and without stop indicator.
2. Slide from start to end or from end to start.
On real device first and last tick is always visible when its selected.
On emulator first and last tick is visible when user drags slider.
Reproduced on Pixel 6 API 33 emulator and SM-G985F/DS API 33
Im not sure but I think thumb should go to position of tick instead of start/end of whole slider.
Reproduced with the sample steps Slider:
```
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun StepsSliderSample() {
var sliderPosition by remember { mutableStateOf(0f) }
val colors: SliderColors = SliderDefaults.colors(
activeTickColor = Color.Red,
inactiveTickColor = Color.Red,
)
Column(modifier = Modifier.padding(horizontal = 16.dp)) {
Slider(
value = sliderPosition,
onValueChange = { sliderPosition = it },
colors = colors,
valueRange = 0f..100f,
onValueChangeFinished = {
// launch some business logic update with the state you hold
// viewModel.updateSelectedSliderValue(sliderPosition)
},
// Only allow multiples of 10. Excluding the endpoints of `valueRange`,
// there are 9 steps (10, 20, ..., 90).
steps = 9,
track = {
SliderDefaults.Track(
sliderState = it,
colors = colors,
drawStopIndicator = null,
)
}
)
}
}
```