Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Aug 20, 2025

Summary

This PR provides a comprehensive analysis and documentation of the key pull requests that fix pinch gesture handler issues on Android. After extensive research through the repository's issues and PRs, I've identified the most important fixes that address various Android-specific problems with pinch gestures.

Key Findings

Recently Merged Fixes (2024)

PR #2983 - "Fix of rotation and pinch gesture on android" (July 2024)

  • Fixes rotation and pinch gestures to continue working after releasing one of the key pointers
  • Addresses gesture interruption when fingers are lifted during multi-touch gestures

PR #3072 - "fix: pinch gesture velocity expressed in scale factor per second on android" (August 2024)

  • Fixes pinch gesture velocity calculation to match iOS behavior
  • Changes delta calculation from milliseconds to seconds for proper velocity units

Critical Historical Fixes

PR #1879 - "Add modified ScaleGestureDetector from AOSP" (March 2022)

  • Most significant foundational fix for Android pinch gestures
  • Replaces Android's default ScaleGestureDetector with a modified version
  • Sets mMinSpan to 0 instead of 27mm, making small pinch gestures work properly
  • Fixes the common issue where pinch only worked when fingers were far apart

PR #2264 - "Fix missing begin event on Android for Pinch and Rotation" (October 2022)

  • Fixes focal point being set to NaN which prevented begin events from firing
  • Ensures proper gesture lifecycle events on Android

Outstanding Issue

PR #2370 - "Fixed faulty pinch gesture handler on Android when in a ScrollView/FlatList" (Open since January 2023)

  • Addresses pinch gestures not working properly inside ScrollView/FlatList components
  • Provides alternative implementation using bounding box calculations
  • Includes video demonstrations of the fix
  • This remains the most requested fix for a common use case

Impact

These fixes collectively address the major Android pinch gesture issues:

  1. ✅ Minimum distance threshold problems (PR Add modified ScaleGestureDetector from AOSP #1879)
  2. ✅ Missing begin events (PR Fix missing begin event on Android for Pinch and Rotation #2264)
  3. ✅ Velocity calculation inconsistencies (PR fix: pinch gesture velocity expressed in scale factor per second on android #3072)
  4. ✅ Gesture continuation after finger release (PR Fix of rotation and pinch gesture on android #2983)
  5. ⏳ ScrollView/FlatList compatibility (PR Fixed faulty pinch gesture handler on Android when in a ScrollView/FlatList #2370 - still pending)

For developers experiencing pinch gesture issues on Android, the most impactful fix is PR #1879 which fundamentally improves the gesture detection mechanism, while PR #2370 addresses the common ScrollView use case but remains unmerged.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@latekvo
Copy link
Member

latekvo commented Aug 20, 2025

Whoops, I was testing what the new button on GitHub UI does :P

@Copilot Copilot AI changed the title [WIP] Find me the PR that fixes the pinch gesture handler on android Document pinch gesture handler Android fixes and provide comprehensive fix analysis Aug 20, 2025
@Copilot Copilot AI requested a review from latekvo August 20, 2025 14:20
Copilot finished work on behalf of latekvo August 20, 2025 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants