Bug 60899 - Android Pinch Gesture does not work when two fingers are approx 1 to 1.5 cm close (not touching) while zooming out
Summary: Android Pinch Gesture does not work when two fingers are approx 1 to 1.5 cm c...
Status: IN_PROGRESS
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.5.0
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-11-28 20:14 UTC by Abhishek D Malwankar
Modified: 2017-12-21 22:36 UTC (History)
4 users (show)

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


Attachments
AndroidStudioPinchApp (162.01 KB, application/x-zip-compressed)
2017-12-15 17:18 UTC, Abhishek D Malwankar
Details
PinchZoomXamarin (32.26 KB, application/x-zip-compressed)
2017-12-15 18:19 UTC, Jon Douglas [MSFT]
Details
Xamarin Forms Pinch Gesture Test app (1.57 MB, application/zip)
2017-12-21 22:20 UTC, Abhishek D Malwankar
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 60899 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
IN_PROGRESS

Description Abhishek D Malwankar 2017-11-28 20:14:59 UTC
I am having a unique issue while using pinch gesture on android device using Xamarin. 

While zooming out using two fingers pinch I am getting a Gesture.Completed status while my two fingers are still on the screen and are moving closer together as soon as my fingers are almost 1 to 1.5 cms apart. This issue does not happen on iOS. I have been able to reproduce this on different android devices to confirm this is not a device related issue (Namely Asus Zenphone 3, New Moto E, etc.)

I am attaching a test project along with this bug and you can see an overlay with text when a pinch is running. The overlay goes away as soon as pinch is completed, which happens when zooming out and fingers are closer together (but still not touching).
Comment 1 Abhishek D Malwankar 2017-11-28 21:08:41 UTC
Please Note: The issue is not reproducible on Windows Android Emulators. However, I was able to reproduce it on Android Emulator that is downloaded with Visual Studio for Mac.
Comment 2 Abhishek D Malwankar 2017-11-28 22:19:47 UTC
I can confirm that this issue exists only on Android versions >= 7.0 and not on older versions of Android.
Comment 3 harryhugh 2017-11-29 09:49:17 UTC
Yes Buddy Agree with you this issue exists only on Android versions >= 7.0 and not on older versions of Android. 

Harry Hugh 

https://techuhow.com/gbwhatsapp-apk/
Comment 4 Abhishek D Malwankar 2017-11-29 18:20:37 UTC
I have also tried different Xamarin Forms versions. We cannot build our project with the latest version of Xamarin forms as we get the issue filed in bug 60293. So the latest Xamarin forms version that I can use to build is 2.4.0.91020 and the issue exists in that version as well.
Comment 5 Jonathan Pryor 2017-12-01 19:00:18 UTC
Xamarin.Android is *just* a binding to the underlying Android APIs. Xamarin.Android should not have different behavior *compared to Java on Android* for the "same" app (same logic, same `AndroidManifest.xml` contents, and in particular the same `<uses-sdk/>` values, as those values will change Android's compatibility behaviors for the app.)

I cannot think of anything in Xamarin.Android *itself* which would trigger the behavior described in Comment #0.

My conclusion is that this is an Android "bug"/"feature". To convince me otherwise, you'd need to provide an equivalent Java app which *doesn't* exhibit the behavior you're seeing with Xamarin.Android.
Comment 6 Abhishek D Malwankar 2017-12-15 17:17:19 UTC
Hello Jonathan,

   As per your comment/suggestion I have created an app in Android Studio to demonstrate that this is not an Android issue but infact a Xamarin issue. Please find the Android Studio project attached. 

Thank you
Comment 7 Abhishek D Malwankar 2017-12-15 17:18:51 UTC
Created attachment 26017 [details]
AndroidStudioPinchApp

Please find attached the Android studio app to demonstrate that the mentioned bug is infact a Xamarin bug and not an Android issue.
Comment 8 Jon Douglas [MSFT] 2017-12-15 18:18:24 UTC
(In reply to Abhishek D Malwankar from comment #7)
> Created attachment 26017 [details]
> AndroidStudioPinchApp
> 
> Please find attached the Android studio app to demonstrate that the
> mentioned bug is infact a Xamarin bug and not an Android issue.

I can not see any difference when porting over the Android Studio application to Xamarin.Android.

Here are a couple videos:

Android Studio:

https://www.screencast.com/t/EOdhwkaATp55

Xamarin.Android:

https://www.screencast.com/t/cGUPe3Qe9wUn

I do not believe this would be an issue with Xamarin.Android and rather an oddity with Android.

Attaching my sample project as well.
Comment 9 Jon Douglas [MSFT] 2017-12-15 18:19:15 UTC
Created attachment 26018 [details]
PinchZoomXamarin
Comment 10 Abhishek D Malwankar 2017-12-21 15:20:32 UTC
   Thank you for your prompt reply Jon Douglas. You are absolutely right the ported Android app works exactly as expected in Xamarin.Android for Anndroid version >= 7.0. This also confirms what Jonathan Pryor mentions in his comment dated 2017-12-01 19:00:18 UTC. 

  So does that mean that there might be an issue in code between Xamarin.Forms and Xamarin.Android, since the original issue I encountered was using PinchGestureRecognizer in Xamarin forms?
Comment 11 Jon Douglas [MSFT] 2017-12-21 16:21:17 UTC
(In reply to Abhishek D Malwankar from comment #10)
>    Thank you for your prompt reply Jon Douglas. You are absolutely right the
> ported Android app works exactly as expected in Xamarin.Android for Anndroid
> version >= 7.0. This also confirms what Jonathan Pryor mentions in his
> comment dated 2017-12-01 19:00:18 UTC. 
> 
>   So does that mean that there might be an issue in code between
> Xamarin.Forms and Xamarin.Android, since the original issue I encountered
> was using PinchGestureRecognizer in Xamarin forms?

I would say it's either an oddity with the device you're testing on, or a Xamarin.Forms specific issue. Please update this bug wth a sample repository built with Xamarin.Forms that demonstrates the difference from Xamarin.Android / Native Android. I am moving this bug to the Forms category instead.
Comment 12 Abhishek D Malwankar 2017-12-21 22:20:47 UTC
Created attachment 26034 [details]
Xamarin Forms Pinch Gesture Test app

Please find attached the Xamarin Forms project that I had posted originally demonstrating the issue. I have tested this project on a Asus Zen phone 3 (model ASUS_Z012DC) Android version 7.0 and a Moto E4 with Android version 7.1.1 (path level Nov 2017) along with several Android emulators. Please note that this
Comment 13 Abhishek D Malwankar 2017-12-21 22:24:52 UTC
Sorry for the incomplete comment above. Please note that the above test project was build using Visual Studio for Mac.
Comment 14 Abhishek D Malwankar 2017-12-21 22:36:00 UTC
Jon, I would also like to mention that in the above Xamarin forms app, that I posted, it shows a text overlay when zoom gesture is in progress. You can see the reproduction of issue when you are zooming out and when two fingers are approximately 1 to 1.5 cm away (still moving closer) that the zoom gesture finishes (overlay disappears). This is the issue that does not happen on the Java app or the Xamarin.Android app.