diff options
author | Samantha Houts <samantha@teamredwall.com> | 2016-11-16 12:14:00 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-16 12:14:00 -0800 |
commit | 20adf7ec74c02f8522b12c14dbb1b5eec3a0dfee (patch) | |
tree | 92efe42b8cbc1a99eea00e6bf968b75922e98b01 /Xamarin.Forms.Controls.Issues | |
parent | e5af21fdc32972d4355af86349d446a2bb6a5b02 (diff) | |
download | xamarin-forms-20adf7ec74c02f8522b12c14dbb1b5eec3a0dfee.tar.gz xamarin-forms-20adf7ec74c02f8522b12c14dbb1b5eec3a0dfee.tar.bz2 xamarin-forms-20adf7ec74c02f8522b12c14dbb1b5eec3a0dfee.zip |
[iOS] Add Platform Specific option to not adjust the status bar text color based on the luminosity of the NavigationBar text color (#517)
* Add reproduction for 37431
* [Core] Add iOS PS StatusBarTextColorMode
* [iOS] Implement StatusBarTextColorMode on NavPage
* Add reproduction for 44777
* Add instructions to 44777 repro
* Update docs
Diffstat (limited to 'Xamarin.Forms.Controls.Issues')
3 files changed, 57 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37431.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37431.cs new file mode 100644 index 00000000..70b7e3d5 --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla37431.cs @@ -0,0 +1,26 @@ +using Xamarin.Forms.CustomAttributes; +using Xamarin.Forms.Internals; +using Xamarin.Forms.PlatformConfiguration; +using Xamarin.Forms.PlatformConfiguration.iOSSpecific; + +namespace Xamarin.Forms.Controls +{ + [Preserve(AllMembers = true)] + [Issue(IssueTracker.Bugzilla, 37431, "NavigationRenderer sets Status Bar Style arbitrarily", PlatformAffected.iOS)] + public class Bugzilla37431 : TestNavigationPage + { + protected override void Init() + { + BarBackgroundColor = Color.White; + BarTextColor = Color.GhostWhite; + + PushAsync(new ContentPage() + { + Content = new Label { Text = "If the status bar text is black, this test has passed. If it is unreadable (i.e., white text on white background), this test has failed." }, + Title = $"This should be GhostWhite on White." + }); + + On<iOS>().SetStatusBarTextColorMode(StatusBarTextColorMode.DoNotAdjust); + } + } +}
\ No newline at end of file diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla44777.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla44777.cs new file mode 100644 index 00000000..100f0e9d --- /dev/null +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla44777.cs @@ -0,0 +1,29 @@ +using Xamarin.Forms.CustomAttributes; +using Xamarin.Forms.Internals; +using Xamarin.Forms.PlatformConfiguration; +using Xamarin.Forms.PlatformConfiguration.iOSSpecific; + +namespace Xamarin.Forms.Controls +{ + [Preserve(AllMembers = true)] + [Issue(IssueTracker.Bugzilla, 44777, "BarTextColor changes color for more than just the Navigation page")] + public class Bugzilla44777 : TestMasterDetailPage + { + protected override void Init() + { + Master = new ContentPage() { Title = "I am a master page" }; + Detail = new NavigationPage(new ContentPage { Content = new Label { Text = "The status bar text color on this page should be white on blue. When you show the Master page fully, the status bar text should be black on white. If the status bar text remains white when the Master page is fully presented, this test has failed." } }); + ((NavigationPage)Detail).BarBackgroundColor = Color.Blue; + ((NavigationPage)Detail).BarTextColor = Color.White; + + IsPresentedChanged += (sender, e) => + { + var mp = sender as MasterDetailPage; + if (mp.IsPresented) + ((NavigationPage)mp.Detail).On<iOS>().SetStatusBarTextColorMode(StatusBarTextColorMode.DoNotAdjust); + else + ((NavigationPage)mp.Detail).On<iOS>().SetStatusBarTextColorMode(StatusBarTextColorMode.MatchNavigationBarTextLuminosity); + }; + } + } +}
\ No newline at end of file diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems index 88ea2c40..a0caedd6 100644 --- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems +++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems @@ -202,6 +202,8 @@ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla40722.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla41153.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Bugzilla44129.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Bugzilla37431.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Bugzilla44777.cs" /> <Compile Include="$(MSBuildThisFileDirectory)_Template.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Issue1028.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Issue1075.cs" /> |