summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Platform.Android')
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/FrameRenderer.cs11
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/NavigationRenderer.cs5
2 files changed, 15 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.Android/Renderers/FrameRenderer.cs b/Xamarin.Forms.Platform.Android/Renderers/FrameRenderer.cs
index 68c7fbc6..4d232e58 100644
--- a/Xamarin.Forms.Platform.Android/Renderers/FrameRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/Renderers/FrameRenderer.cs
@@ -1,6 +1,7 @@
using System.ComponentModel;
using Android.Graphics;
using Android.Graphics.Drawables;
+using Android.Views;
using AButton = Android.Widget.Button;
using ACanvas = Android.Graphics.Canvas;
using GlobalResource = Android.Resource;
@@ -10,6 +11,7 @@ namespace Xamarin.Forms.Platform.Android
public class FrameRenderer : VisualElementRenderer<Frame>
{
bool _disposed;
+ readonly MotionEventHelper _motionEventHelper = new MotionEventHelper();
protected override void Dispose(bool disposing)
{
@@ -22,6 +24,14 @@ namespace Xamarin.Forms.Platform.Android
}
}
+ public override bool OnTouchEvent(MotionEvent e)
+ {
+ if (base.OnTouchEvent(e))
+ return true;
+
+ return _motionEventHelper.HandleMotionEvent(Parent, e);
+ }
+
protected override void OnElementChanged(ElementChangedEventArgs<Frame> e)
{
base.OnElementChanged(e);
@@ -30,6 +40,7 @@ namespace Xamarin.Forms.Platform.Android
{
UpdateBackground();
UpdateCornerRadius();
+ _motionEventHelper.UpdateElement(e.NewElement);
}
}
diff --git a/Xamarin.Forms.Platform.Android/Renderers/NavigationRenderer.cs b/Xamarin.Forms.Platform.Android/Renderers/NavigationRenderer.cs
index 109bb691..ebe54272 100644
--- a/Xamarin.Forms.Platform.Android/Renderers/NavigationRenderer.cs
+++ b/Xamarin.Forms.Platform.Android/Renderers/NavigationRenderer.cs
@@ -287,7 +287,10 @@ namespace Xamarin.Forms.Platform.Android
}
s_currentAnimation = null;
tcs.TrySetResult(true);
- ((Platform)Element.Platform).NavAnimationInProgress = false;
+ if (Element?.Platform != null)
+ {
+ ((Platform)Element.Platform).NavAnimationInProgress = false;
+ }
} });
}
}