-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fix for Frame PanGestureRecognizer is not working in Android #25239
Conversation
/azp run |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
2 similar comments
This comment was marked as outdated.
This comment was marked as outdated.
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/rebase |
72dbbd6
to
b3b1189
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
@@ -23,7 +23,8 @@ public bool HandleMotionEvent(IViewParent parent, MotionEvent motionEvent) | |||
return false; | |||
} | |||
|
|||
return true; | |||
// We should consider the InputTransparent for the VisualElement and decides to pass touch to the event | |||
return ShouldPassThroughElement(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to do more tests locally but ideally...
This implementation should be the same as the one in the Compatibility layer
public bool HandleMotionEvent(IViewParent parent, MotionEvent motionEvent) |
In cases like the Frame, the missing part is the NotifyFakeHandling that impact in the behavior of the DispatchTouchEvent method from an y View.
if (result && NotReallyHandled) |
/rebase |
04b3340
to
7c0c7f0
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Since Frame is now officially deprecated lets not spend too much time on this. Closing for now. |
Root Cause
The touch events in the Frame control on the Android platform are not handled correctly. Specifically, in the FrameRenderer, the touch event handler consistently returns true, which suppresses the default behavior and prevents the expected response to touch interactions.
Description of Change
The MotionEventHelper class contains a method called ShouldPassThroughElement(), which is designed to evaluate whether a touch event should be passed through an element. Utilizing this method will ensure correct touch handling, thereby resolving the issue
Issues Fixed
Fixes #16978
Output Video
Frame.pan.not.working.mp4
Frame.pan.working.mp4