Add support for swipe with multiple fingers
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
Loading
Please register or sign in to comment