summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.ControlGallery.Android
diff options
context:
space:
mode:
authorRui Marinho <me@ruimarinho.net>2016-09-15 17:33:39 (GMT)
committerJason Smith <jason.smith@xamarin.com>2016-09-15 17:33:39 (GMT)
commitd3cf333590a1c762e04e3083003076e1d23cdcf5 (patch)
treede26d61e782aae622f2415a5d07094f859806bfc /Xamarin.Forms.ControlGallery.Android
parent9f361c7e723bd685eeb0a8946930b7c0f9a96bb2 (diff)
downloadxamarin-forms-d3cf333590a1c762e04e3083003076e1d23cdcf5.zip
xamarin-forms-d3cf333590a1c762e04e3083003076e1d23cdcf5.tar.gz
xamarin-forms-d3cf333590a1c762e04e3083003076e1d23cdcf5.tar.bz2
[Android] Fix failing UITests (#356)
Diffstat (limited to 'Xamarin.Forms.ControlGallery.Android')
-rw-r--r--Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs18
1 files changed, 16 insertions, 2 deletions
diff --git a/Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs b/Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs
index 7f86a85..a550212 100644
--- a/Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs
+++ b/Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs
@@ -16,6 +16,7 @@ using Android.Content;
using Android.Runtime;
using Android.Util;
using AButton = Android.Widget.Button;
+using AView = Android.Views.View;
using Android.OS;
using System.Reflection;
@@ -44,7 +45,7 @@ namespace Xamarin.Forms.ControlGallery.Android
}
_page = newElement as MasterDetailPage;
- _page.PropertyChanged += Page_PropertyChanged;
+ _page.PropertyChanged += Page_PropertyChanged;
_page.LayoutChanged += Page_LayoutChanged;
}
@@ -416,10 +417,23 @@ namespace Xamarin.Forms.ControlGallery.Android
return view;
}
}
- public abstract class CustomContentRenderer : ViewRenderer
+
+ [Preserve]
+ public class CustomContentRenderer : ViewRenderer
{
+ [Preserve]
+ public CustomContentRenderer()
+ {
+ AutoPackage = true;
+ }
+
+ protected override AView CreateNativeControl()
+ {
+ return new AView(Context);
+ }
}
+ [Preserve]
public class CustomNativeButton : AButton
{
public CustomNativeButton(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer)