Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce a custom scale gesture detector implementation #73

Merged
merged 1 commit into from
Jul 12, 2019

Conversation

LukasPaczos
Copy link
Contributor

@LukasPaczos LukasPaczos commented Jul 5, 2019

Closes #39.

This PR introduces a custom scale gesture detector, not relying on the one provided in the support library.
Additionally:

  • Fixes an issue where a minimal required span for multi-pointer gesture has not been set.
  • Correctly interrupts quick scale gesture when another pointer is placed.
  • Removes the test introduced in Guard against move events coming from different view trees #71 as it's no more applicable with a changed motion event consumption. The example now consistently reproduces the issues, but the stack trace comes from the ScrollView, which is expected.
  • Sets the minimal required span for any multi-pointer gesture to 6mm for API >= 24 or 10mm otherwise. This has been used only for the scale gesture before but now is replacing 55dp for all gestures (which wasn't set anyway because of the first bullet point).
  • Introduces a quick scale as another progressive gesture that can be filtered separately from the traditional pinch-to-zoom gesture (AndroidGesturesManager#GESTURE_TYPE_QUICK_SCALE).

@LukasPaczos LukasPaczos added this to the v0.5.0 milestone Jul 5, 2019
@LukasPaczos LukasPaczos requested a review from tobrun July 5, 2019 08:18
@LukasPaczos LukasPaczos changed the title Introduce a custom StandardScaleGestureDetector implementation Introduce a custom scale gesture detector implementation Jul 5, 2019
Copy link
Member

@tobrun tobrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks and feels great! :shipit:

@LukasPaczos LukasPaczos force-pushed the lp-39-scale-gesture-detector branch from 588280b to 02f6a67 Compare July 5, 2019 08:34
@LukasPaczos LukasPaczos force-pushed the lp-39-scale-gesture-detector branch 3 times, most recently from 33ba0c4 to 0997f31 Compare July 11, 2019 17:10
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.

Accessing hidden field violation - ScaleGestureDetector
2 participants