[Android] Fix failing UITests (#356)
This commit is contained in:
Родитель
9f361c7e72
Коммит
d3cf333590
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче