-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Android: AppShell prevents gestures on native control #6553
Comments
We are also facing the same issue after the VS update. |
Same issue here. In my case, the pinch gesture fires the zoom feature in a chart, notice how it is only working when the pinch is vertical, and ignored when horizontal (3 MB gif): |
@beto-rodriguez aaaah good call! That explains why I see a little bit of interaction and then stops. If I very carefully pan or pinch vertically I can go pretty far, but as soon as I exceed a small horizontal threshold it stops the interaction. I'm assuming our control just acts slightly different and stops reacting completely when this happens where yours doesn't. |
I'm curious if this is caused by this behavior in |
Built a Xamarin.Android .net6 app and using the |
verified repro on android 11 with VS 17.3.0 Preview 2.0 [32506.315.main] |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
This now seems to be working properly for me on net 7 |
Hi @dotMorten. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version. You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Verified this issue with Visual Studio Enterprise 17.7.0 Preview 5.0. Not repro on android device platform with sample project. |
Confirmed |
Description
When using our native Android map control that uses motion events to detect and act on drag and pinch to navigate the control, the
AppShell
view intercepts these events and prevents dragging and pinching beyond the first few pixels (if appears that if you drag or pinch very slowly you can get a little further before this event gets intercepted and stops responding).The control works fine outside an
AppShell
.The native control is relying on
GestureDetector
,ScaleGestureDector
andMotionEvents
/Touch
to react to user input. It returns true on these event handlers to mark them as handled when reacting to user input.It was suggested by @PureWeen that locking the flyout behavior could address it based on, but that didn't help. ie in AppShell constructor:
When doing this though, I do notice that the touch events does go through the flyout and down into the map control (but still with the limited interaction).
Setting
InputTransparent=true
orIsEnabled=false
on the appshell also doesn't have any effect.The same control wrapped in Xamarin.Forms AppShell does not exhibit this behavior.
Steps to Reproduce
App.xaml.cs
, change the app to launchMainPage
instead ofAppShell
, and observe interactions now work fine.Version with bug
Release Candidate 2 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 11
Did you find any workaround?
Don't use AppShell, but that's hardly a workaround.
Relevant log output
No response
Update
As noted below looks like only horizontal gestures are getting blocked. Vertical pan and zoom/pinch works (but as soon as a horizontal threshold is performed all interaction stops)
The text was updated successfully, but these errors were encountered: