packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/MultiPointerDraggable.kt
0 → 100644
+191
−0
+6
−5
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
This CL replaces the usage of Modifier.draggable by a custom Modifier.pointerInput that returns the number of pointers down to DraggableHandler.onDragStarted when a drag starts. The current logic is pretty simple and mostly forked from Draggable.kt and DragGestureDetector.kt: we still wait for the *first* pointer down to reach the touch slop, then we count the number of distinct pointers that are down/pressed. In the future, we might want to make the implementation more complex and wait for any pointer down to reach the touch slop, instead of just the first one. Bug: 291055080 Test: SwipeToSceneTest Change-Id: Ifdb3f118b6765a8b6d07b3b4fe0edd78273b33c2