Vsevolod Ganin
06/13/2021, 3:11 PMSlider
in scrollable list. When I start to scroll the list and hit slider’s track in the way, the thumb jumps to that position immediately and scroll also happens. Is there a way to workaround this problem? For example, for buttons such problem doesn’t exist. When I hit button when starting to drag, it doesn’t actually trigger onClick
(the ripple effect is rendered anyway though).@Preview
@Composable
private fun Test() {
Column(Modifier.verticalScroll(rememberScrollState())) {
repeat(50) {
val value = remember { mutableStateOf(0f) }
Slider(
value = value.value,
onValueChange = { value.value = it },
)
}
}
}
The game is called “try to scroll while not modifying any slider’s state”matvei
06/14/2021, 10:57 AMVsevolod Ganin
06/14/2021, 2:06 PM