Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[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
Contributor

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 added s/unverified New report that has yet to be verified t/bug 🐛 labels May 1, 2019
@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
@kingces95
Copy link
Contributor

Reproduces as described.

@kingces95 kingces95 added the e/8 🕗 8 label May 2, 2019
@marius-bughiu
Copy link

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
Copy link
Member

samhouts commented May 6, 2019

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

@samhouts samhouts removed the s/unverified New report that has yet to be verified label May 8, 2019
@rizamarhaban
Copy link

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
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants