maui
maui copied to clipboard
Fix for Frame PanGestureRecognizer is not working in Android
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
| Before Issue Fix | After Issue Fix |
|---|---|
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
Azure Pipelines successfully started running 3 pipeline(s).
Azure Pipelines successfully started running 3 pipeline(s).
Azure Pipelines successfully started running 3 pipeline(s).
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/rebase
/azp run
Azure Pipelines successfully started running 3 pipeline(s).
/rebase
/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.