Piotr Prus
02/16/2021, 12:48 PMSurface(color = MaterialTheme.colors.background) {
Box(modifier = Modifier.size(100.dp).background(Color.Yellow)
.pointerInput(Unit) {
detectVerticalDragGestures(
onDragCancel = { Log.d("AAAA", "onDragCancel") },
onDragEnd = { Log.d("AAAA", "onDragEnd") },
onVerticalDrag = { change, dragAmount -> Log.d("AAAA", "Drag change: $dragAmount") }
)
})
}
It is a simple Box. The issue: onDragEnd
and onDragCancel
are never called. The onVerticalDrag
works like a charm. Is there any mistake in my code or should I file a bug? Compose version : alpha12Jan Bína
02/16/2021, 12:56 PMchange
in onVerticalDrag
if you want to accept the drag motionPiotr Prus
02/16/2021, 1:00 PM