Hello. I’m using `PointerInputScope.detectTransfor...
# compose
g
Hello. I’m using
PointerInputScope.detectTransformGestures
to compute and apply some transformations to a
composable
but I need to know when the user stops touching the screen. I was thinking in combining it with
PointerInputScope.detectDragGestures
and listen for
onDragEnd
but only one is used. 1 - Is is possibile to combine “Gestures”? 2 - What’s the best approach for what I want? thx.
a
The best approach is to create your version of
detectTransformGestures
.
👍 1
g
Yup that’s what I ended up doing
Copy code
suspend fun PointerInputScope.detectTransformGestures(
    panZoomLock: Boolean = false,
    onEvent: (event: PointerEvent) -> Unit, <<<<<<<<<<<<<<<<<<<<<<<<<
    onGesture: (centroid: Offset, pan: Offset, zoom: Float, rotation: Float) -> Unit
) { ... }