Hi ! I've looked at the dragGestureFilter document...
# compose
l
Hi ! I've looked at the dragGestureFilter documentation (https://developer.android.com/reference/kotlin/androidx/compose/ui/gesture/package-summary#draggesturefilter), but it is defined for a Modifier. So, I can't use it for a canvas element (such as drawCircle) : is there an equivalent for setting a drag on a canvas element ?
a
No, there's not. You can set input handling modifiers on the whole Canvas composable and perform your own gesture management though. See
Modifier.pointerInput
and associated gesture recognition suspend functions that are extensions on that scope.
👍 1
l
Thank you : I'll listen to drag and drop on the whole canvas 🙂 (and restrict the zone with pointerInput)
👍 1