summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs18
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43161.cs5
2 files changed, 19 insertions, 4 deletions
diff --git a/Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs b/Xamarin.Forms.ControlGallery.Android/CustomRenderers.cs
index 7f86a85d..a550212c 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)
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43161.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43161.cs
index 159c793d..3a45cc84 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43161.cs
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43161.cs
@@ -9,6 +9,7 @@ using NUnit.Framework;
namespace Xamarin.Forms.Controls
{
+
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 43161, "[iOS] Setting Accessory in ViewCellRenderer breaks layout", PlatformAffected.iOS)]
public class Bugzilla43161 : TestContentPage
@@ -51,7 +52,7 @@ namespace Xamarin.Forms.Controls
Content = new StackLayout { Children = { label, listView, listView2, listView3 } };
}
-#if UITEST
+#if (UITEST && __IOS__)
[Test]
public void Bugzilla43161Test()
{
@@ -61,4 +62,4 @@ namespace Xamarin.Forms.Controls
}
#endif
}
-} \ No newline at end of file
+}