Bug 59726 - Android Pinch Gesture comes in middle of Pan Gesture
Summary: Android Pinch Gesture comes in middle of Pan Gesture
Status: NEEDINFO
Alias: None
Product: Forms
Classification: Xamarin
Component: Android (show other bugs)
Version: 2.3.4
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-09-25 15:26 UTC by RogerH
Modified: 2017-10-02 16:45 UTC (History)
2 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description RogerH 2017-09-25 15:26:45 UTC
Bug Report
==========
I have an application that listens for Pan Gestures and for Pinch Gestures.

On iOS each gesture has a logical structure
You get a Pan.Starting event then lost of Pan.Running events and finally a Pan.Completed event.
or
a Pinch.Starting, lots of Pinch.Running events and then a Pinch.Completed event.


On Android things are different and you can be in the middle of some Pan events when Pinch Events start to appear.
When you do a pinch on Android, the first finger down is detected as a Pan (with a very tiny movement) and Pan.Starting
and a Pan.Running event is fired.

The second finger then triggers the Pinch Gesture sequence of events (Starting, Running, Completed)

As the pinch is released, Android returns to Panning and few more Pan events are fire before a Pan Complete.
So you end up with this chain of events on Android
  Pan.Start, Pan.Running and then 'Pinch.Start, Pinch.Running, Pinch.Completed' followed by more Pan.Running and Pan.Completed

My Workaround
=============
I set a flag in Pan.Started (and clear in Pan.Completed).
If I get a Pinch and my flag is true (so Pinching while inside a Pan Gesture) I set a 2nd flag that helps me to ignore the Pans that come after the Pinch.

Suggested Fix
=============
It would be nice for iOS and Android to be consistent where you either have a Pan sequence (start, running, completed) or a Pinch sequence (started, running, completed) but you don't have one inside the other.
Comment 1 Paul DiPietro [MSFT] 2017-10-02 16:45:30 UTC
Could you upload a reproduction to best illustrate this behavior?

Note You need to log in before you can comment on or make changes to this bug.