summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android/Renderers/MotionEventHelper.cs
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@users.noreply.github.com>2017-06-20 09:40:07 -0600
committerRui Marinho <me@ruimarinho.net>2017-06-20 16:40:07 +0100
commit99074753a0f20414be8eb423153fd6aaaafef87b (patch)
tree8aebc0c48dcf1a3de6c6e3eaddf37604032ef812 /Xamarin.Forms.Platform.Android/Renderers/MotionEventHelper.cs
parentf7c943dc7798b3449d2bf8319aca8a9ab448ffec (diff)
downloadxamarin-forms-99074753a0f20414be8eb423153fd6aaaafef87b.tar.gz
xamarin-forms-99074753a0f20414be8eb423153fd6aaaafef87b.tar.bz2
xamarin-forms-99074753a0f20414be8eb423153fd6aaaafef87b.zip
Align Layout transparency behavior between Android, iOS, Windows (#935)
* Setting up repros * Tests for all combos of opacity, background color, and InputTransparent * Make InputTransparent work correctly for Layouts on Windows * Prevent low opacity from making Layouts implicitly input transparent * Real target values in TransparentOverlayTests * Allow layouts with transparent backgrounds to be clickable * Fix gesture bubbling behavior for layouts * Fix spacing * Remove dead code and usings * Fix spacing * Add missing using directive * Adjust transparent overlay test to work with iOS quirks * Fix spacing * Fix bugs caused by not filtering ACTION_CANCEL in MotionEventHelper * Attempting to fix the tests on iOS (where UI tests can't see the buttons) * Remove extra lines * Another attempt to get tests working on iOS * Another attempt to get iOS UI tests working for transparent overlays
Diffstat (limited to 'Xamarin.Forms.Platform.Android/Renderers/MotionEventHelper.cs')
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/MotionEventHelper.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.Android/Renderers/MotionEventHelper.cs b/Xamarin.Forms.Platform.Android/Renderers/MotionEventHelper.cs
index 4ed06d26..2653ee6e 100644
--- a/Xamarin.Forms.Platform.Android/Renderers/MotionEventHelper.cs
+++ b/Xamarin.Forms.Platform.Android/Renderers/MotionEventHelper.cs
@@ -7,9 +7,9 @@ namespace Xamarin.Forms.Platform.Android
VisualElement _element;
bool _isInViewCell;
- public bool HandleMotionEvent(IViewParent parent)
+ public bool HandleMotionEvent(IViewParent parent, MotionEvent motionEvent)
{
- if (_isInViewCell || _element.InputTransparent)
+ if (_isInViewCell || _element.InputTransparent || motionEvent.Action == MotionEventActions.Cancel)
{
return false;
}