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

[Bug] PanGestureRecognizer in a Shell app doesn't trigger correctly on Android #6060

Closed
sthewissen opened this issue May 1, 2019 · 5 comments

Comments

@sthewissen
Copy link

commented May 1, 2019

Description

I've built a screen for David Ortinau's Xappy app (which uses Shell) that has a hidden panel on the bottom that can be dragged into view. However, on Android I've noticed that the PanGestureRecognizer used for dragging the view on screen doesn't respond to gestures as it should.

Steps to Reproduce

Please see Reproduction Link for a repo + steps to reproduce within that Repo.

Expected Behavior

The panel should drag into screen seeing as how the GestureRecognizer is used to offset it's Y position.

Actual Behavior

Seems like the GestureRecognizer is only firing incidentally and not as continuous as it should.

Basic Information

  • Version with issue: 4.0.0.346134-pre9
  • Last known good version: N/A
  • IDE: Visual Studio Mac 8.0.5 (build 9)
  • Platform Target Frameworks:
    • Android: Tested on 9.0
  • Android Support Library Version: 28.0.0.1
  • Affected Devices: Tested on a Galaxy S7 using Android 8.0.

Reproduction Link

You can use my branch of David Ortinau's Xappy project which has the problem in it.

https://github.com/sthewissen/Xappy

  • Run the app
  • Go to Scenarios > Pick the first one (Maps)
  • Try using the drag handle to slide the panel open -> doesn't work.

Now, change this line of code in App.xaml.cs, running the page without Shell:

            MainPage = new AppShell();

Into:

            MainPage = new MapPage();
  • Run the app again and drag the handle again which should make the drag a lot more responsive. This is the behavior one would expect. Feels like something else is hijacking the gesture because it does trigger occasionally.

@sthewissen sthewissen changed the title [Bug] Adding a PanGestureRecognizer in a Shell app doesn't trigger correctly on Android [Bug] PanGestureRecognizer in a Shell app doesn't trigger correctly on Android May 1, 2019

@pauldipietro pauldipietro added this to New in Triage May 1, 2019

@kingces95

This comment has been minimized.

Copy link
Member

commented May 2, 2019

Reproduces as described.

@kingces95 kingces95 moved this from New to Ready For Work in Triage May 2, 2019

@kingces95 kingces95 added the e/8 🕗 label May 2, 2019

@marius-bughiu

This comment has been minimized.

Copy link

commented May 5, 2019

I'm having the same issue - I think - with the PanGestureRecognizer. It works as expected without Shell, but when inside a Shell app it will only work as long as I drag horizontally. As soon as I drag up/down it stops triggering the PanUpdated event without even calling it with a Completed/Cancelled status.

If you were to debug and write the TotalY values to console and drag slowly you will see that it can go to approx +/- 7.1 on the Y axis before it stops working.

@samhouts

This comment has been minimized.

Copy link
Member

commented May 6, 2019

Likely related to #5205. Touch events are being intercepted improperly.

@samhouts samhouts removed the s/unverified label May 8, 2019

@samhouts samhouts removed this from Ready For Work in Triage May 8, 2019

@rizamarhaban

This comment has been minimized.

Copy link

commented May 20, 2019

Shell Issue

Just tested inside an AppShell item content page using Xamarin.Forms with preview version 4.0.0.394984-pre10 and the chocking still there. Cannot pinch or pan properly and sometimes the gestures not working.

Device: Samsung Galaxy A70 (Android Pie 9.0)

However, if the Xamarin.Forms app not using Shell at all, and I just add one content page, then the gesture works normally on the same device.

@PureWeen

This comment has been minimized.

Copy link
Contributor

commented May 25, 2019

Android pages are by default inside a nested scrollview which is going to interfere with gestures

@samhouts samhouts added this to In Progress in vCurrent (4.2.0) Jul 31, 2019

Android Ready For Work automation moved this from To do to Done Aug 6, 2019

vCurrent (4.2.0) automation moved this from In Progress to Done Aug 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
6 participants
You can’t perform that action at this time.