Thomas
02/09/2021, 9:13 PMdragGestureFilter
with startDragImmediately = true
since it was deprecated?Thomas
02/09/2021, 9:15 PMpointerInput
with detectDragGestures
but that seems to only activate after a touch slop. I would like to disable the touch slop just like before so the lambda is called immediately when view is touched.Thomas
02/09/2021, 9:17 PMDoris Liu
02/10/2021, 6:16 AMDoris Liu
02/10/2021, 6:20 AMThomas
02/10/2021, 1:34 PM.pointerInput(Unit) {
fun updateColor(position: Offset) {
TODO()
}
forEachGesture {
awaitPointerEventScope {
val down = awaitFirstDown(requireUnconsumed = false)
updateColor(down.position)
down.consumeAllChanges()
drag(down.id) { change ->
updateColor(change.position)
change.consumeAllChanges()
}
}
}
}
Thomas
02/10/2021, 1:47 PMdown
event. The sample does not do that, but I am using the down
position here.George Mount
02/10/2021, 6:07 PMGeorge Mount
02/10/2021, 6:09 PMThomas
02/10/2021, 7:18 PM