From 17fdde66d94155fc62a034fa6658995bef6fd6e5 Mon Sep 17 00:00:00 2001 From: Jason Smith Date: Tue, 22 Mar 2016 13:02:25 -0700 Subject: Initial import --- .../Issue968.cs | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue968.cs (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue968.cs') diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue968.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue968.cs new file mode 100644 index 00000000..64c5c8f8 --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue968.cs @@ -0,0 +1,52 @@ + +using Xamarin.Forms.CustomAttributes; + +#if UITEST +using NUnit.Framework; +using Xamarin.UITest; +#endif + +namespace Xamarin.Forms.Controls +{ + [Preserve (AllMembers = true)] + [Issue (IssueTracker.Github, 968, "StackLayout does not relayout on device rotation", PlatformAffected.iOS, NavigationBehavior.PushModalAsync)] + public class Issue968 : TestContentPage + { + protected override void Init () + { + Title = "Nav Bar"; + + var layout = new StackLayout { + Padding = new Thickness (20), + BackgroundColor = Color.Gray + }; + + layout.Children.Add (new BoxView { + BackgroundColor = Color.Red, + VerticalOptions = LayoutOptions.FillAndExpand, + HorizontalOptions = LayoutOptions.FillAndExpand + }); + + layout.Children.Add (new Label { + Text = "You should see me after rotating" + }); + + Content = layout; + } + +#if UITEST + [Test] + [Description ("Verify the layout lays out on rotations")] + [UiTest (typeof(StackLayout))] + public void Issue968TestsRotationRelayoutIssue () + { + RunningApp.SetOrientationLandscape (); + RunningApp.Screenshot ("Rotated to Landscape"); + RunningApp.WaitForElement (q => q.Marked ("You should see me after rotating")); + RunningApp.Screenshot ("StackLayout in Modal respects rotation"); + RunningApp.SetOrientationPortrait (); + } +#endif + + } +} -- cgit v1.2.3