From 4780d56df2ccf8162d77da1428e933fab2546b6c Mon Sep 17 00:00:00 2001 From: Yann Zahringer Ferrando <YZahringer@users.noreply.github.com> Date: Sat, 26 Sep 2020 18:31:47 +0200 Subject: [PATCH] set Handled to False on Android Touch event (#76) --- TouchEffect.Droid/PlatformTouchEff.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/TouchEffect.Droid/PlatformTouchEff.cs b/TouchEffect.Droid/PlatformTouchEff.cs index c3e47ec..53f9d5b 100644 --- a/TouchEffect.Droid/PlatformTouchEff.cs +++ b/TouchEffect.Droid/PlatformTouchEff.cs @@ -118,13 +118,15 @@ protected override void OnDetached() private void OnTouch(object sender, AView.TouchEventArgs e) { + e.Handled = false; + if (_effect?.IsDisabled ?? true) return; if (IsAccessibilityMode) { return; } - e.Handled = true; + switch (e.Event.ActionMasked) { case MotionEventActions.Down: @@ -186,9 +188,6 @@ private void OnTouch(object sender, AView.TouchEventArgs e) _isHoverSupported = true; _effect?.HandleHover(HoverStatus.Exited); break; - default: - e.Handled = false; - break; } }