I would like to use drag and tap gestures in the same view.
Canvas(
modifier = Modifier
.fillMaxSize()
.pointerInput(Unit) {
detectTapGestures(
onDoubleTap = {
Log.i("Double Tap","Clicked")
}
)
detectDragGestures { change, dragAmount ->
change.consumeAllChanges()
dragAmountX = dragAmount.x
dragAmountY = dragAmount.y
}
}
)
I tried this way but only tap gesture is working. How can i use tap and drag gesture at the same time in a view ?