diff options
author | E.Z. Hart <hartez@users.noreply.github.com> | 2017-05-04 03:51:01 -0600 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2017-05-04 10:59:27 +0100 |
commit | 961938e238c2e650a34d88836b2b321cb3fcb021 (patch) | |
tree | e0dbcb72232ab1f3e55c90a9e61a6041c42c43aa /Xamarin.Forms.Platform.Android | |
parent | e509ed905a93bfa76dd781d7119559f6e94b8278 (diff) | |
download | xamarin-forms-961938e238c2e650a34d88836b2b321cb3fcb021.tar.gz xamarin-forms-961938e238c2e650a34d88836b2b321cb3fcb021.tar.bz2 xamarin-forms-961938e238c2e650a34d88836b2b321cb3fcb021.zip |
Give layouts a chance to handle touch events after passing though immediate children (#902)
* Repro for Bugzilla 55912
* Automate test
* Give the layout a chance to actually handle gestures before bubbling up
Diffstat (limited to 'Xamarin.Forms.Platform.Android')
-rw-r--r-- | Xamarin.Forms.Platform.Android/Platform.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Xamarin.Forms.Platform.Android/Platform.cs b/Xamarin.Forms.Platform.Android/Platform.cs index e2326d48..add84eb6 100644 --- a/Xamarin.Forms.Platform.Android/Platform.cs +++ b/Xamarin.Forms.Platform.Android/Platform.cs @@ -1070,9 +1070,12 @@ namespace Xamarin.Forms.Platform.Android if (result && _notReallyHandled) { - // If the child control returned true from its touch event handler but signalled that it was a fake "true", leave the event unhandled - // so parent controls have the opportunity - return false; + // If the child control returned true from its touch event handler but signalled that it was a fake "true", then we + // don't consider the event truly "handled" yet. + // Since a child control short-circuited the normal dispatchTouchEvent stuff, this layout never got the chance for + // IOnTouchListener.OnTouch and the OnTouchEvent override to try handling the touches; we'll do that now + + return OnTouchEvent(e); } return result; |