summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs16
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32830.cs12
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla45926.cs8
-rw-r--r--Xamarin.Forms.Controls/ControlGalleryPages/AppearingGalleryPage.cs3
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/FrameRenderer.cs11
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/NavigationRenderer.cs5
6 files changed, 51 insertions, 4 deletions
diff --git a/Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs b/Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs
index e219b82c..d8c5b9c0 100644
--- a/Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs
+++ b/Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs
@@ -533,15 +533,27 @@ namespace Xamarin.Forms.ControlGallery.Android
// }
// }
- public class NoFlashTestNavigationPage : Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer
+ public class NoFlashTestNavigationPage
+#if FORMS_APPLICATION_ACTIVITY
+ : Xamarin.Forms.Platform.Android.NavigationRenderer
+#else
+ : Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer
+#endif
{
+#if !FORMS_APPLICATION_ACTIVITY
protected override void SetupPageTransition(global::Android.Support.V4.App.FragmentTransaction transaction, bool isPush)
{
transaction.SetTransition((int)FragmentTransit.None);
}
+#endif
}
- public class QuickCollectNavigationPage : Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer
+ public class QuickCollectNavigationPage
+#if FORMS_APPLICATION_ACTIVITY
+ : Xamarin.Forms.Platform.Android.NavigationRenderer
+#else
+ : Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer
+#endif
{
bool _disposed;
NavigationPage _page;
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32830.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32830.cs
index 0e97a33d..96aa5e8a 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32830.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32830.cs
@@ -133,6 +133,8 @@ namespace Xamarin.Forms.Controls.Issues
[Test]
public void Bugzilla32830Test()
{
+ IgnoreFormsApplicationActivity();
+
RunningApp.WaitForElement(q => q.Marked(BottomLabel));
RunningApp.WaitForElement(q => q.Marked(Button1));
RunningApp.Tap(q => q.Marked(Button1));
@@ -140,6 +142,16 @@ namespace Xamarin.Forms.Controls.Issues
RunningApp.Tap(q => q.Marked(Button2));
RunningApp.WaitForElement(q => q.Marked(BottomLabel));
}
+
+ static void IgnoreFormsApplicationActivity()
+ {
+#if __ANDROID__
+ if (AppSetup.IsFormsApplicationActivity)
+ {
+ Assert.Ignore("This test only applies to FormsAppCompatActivity.");
+ }
+#endif
+ }
#endif
}
} \ No newline at end of file
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla45926.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla45926.cs
index 152d94ad..4427f390 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla45926.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla45926.cs
@@ -1,5 +1,6 @@
using System;
using System.Threading;
+using System.Threading.Tasks;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
@@ -66,9 +67,12 @@ namespace Xamarin.Forms.Controls.Issues
RunningApp.WaitForElement (q => q.Marked ("New Page"));
RunningApp.Tap (q => q.Marked ("New Page"));
+ RunningApp.WaitForElement (q => q.Marked ("Second Page #1"));
RunningApp.Back();
+ RunningApp.WaitForElement (q => q.Marked ("Intermediate Page"));
RunningApp.Back();
RunningApp.Tap(q => q.Marked("Do GC"));
+ RunningApp.Tap(q => q.Marked("Do GC"));
RunningApp.Tap(q => q.Marked("Send Message"));
RunningApp.Tap(q => q.Marked("Do GC"));
@@ -81,6 +85,10 @@ namespace Xamarin.Forms.Controls.Issues
[Preserve(AllMembers = true)]
public class _45926IntermediatePage : ContentPage
{
+ public _45926IntermediatePage()
+ {
+ Content = new Label { Text = "Intermediate Page" };
+ }
}
[Preserve(AllMembers = true)]
diff --git a/Xamarin.Forms.Controls/ControlGalleryPages/AppearingGalleryPage.cs b/Xamarin.Forms.Controls/ControlGalleryPages/AppearingGalleryPage.cs
index 21d91906..548ec96b 100644
--- a/Xamarin.Forms.Controls/ControlGalleryPages/AppearingGalleryPage.cs
+++ b/Xamarin.Forms.Controls/ControlGalleryPages/AppearingGalleryPage.cs
@@ -109,7 +109,8 @@ namespace Xamarin.Forms.Controls
protected override void OnAppearing ()
{
base.OnAppearing ();
- Device.StartTimer (new TimeSpan (200), () => {
+
+ Device.StartTimer (TimeSpan.FromMilliseconds(750), () => {
_listMessages.ItemsSource = App.AppearingMessages;
return false;
});
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;
+ }
} });
}
}