summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android/Platform.cs
diff options
context:
space:
mode:
authorRui Marinho <me@ruimarinho.net>2017-09-16 02:51:19 +0100
committerSamantha Houts <samantha.houts@xamarin.com>2017-09-15 18:51:48 -0700
commit352773a8432033fa384b8d1e841f0987d175f93b (patch)
tree43f1a27c2027459e59ba19175871a596afbfe57f /Xamarin.Forms.Platform.Android/Platform.cs
parentfc3ad54edbe4f7e33e2d8c4f9bc217b93dd62ecc (diff)
downloadxamarin-forms-352773a8432033fa384b8d1e841f0987d175f93b.tar.gz
xamarin-forms-352773a8432033fa384b8d1e841f0987d175f93b.tar.bz2
xamarin-forms-352773a8432033fa384b8d1e841f0987d175f93b.zip
[Android] Hide actionbar when MDP with NavigationPage with hidden NavigationBar (#1120)
* [ControlGallery] Add repo and test for Bugzilla27731 * [Android] Hide ActionBar if MDP with NavigationPage that hides the NavigationBar
Diffstat (limited to 'Xamarin.Forms.Platform.Android/Platform.cs')
-rw-r--r--Xamarin.Forms.Platform.Android/Platform.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.Android/Platform.cs b/Xamarin.Forms.Platform.Android/Platform.cs
index ebdf5e96..5cc7475a 100644
--- a/Xamarin.Forms.Platform.Android/Platform.cs
+++ b/Xamarin.Forms.Platform.Android/Platform.cs
@@ -909,6 +909,11 @@ namespace Xamarin.Forms.Platform.Android
bool hasMasterDetailPage = CurrentMasterDetailPage != null;
bool navigated = CurrentNavigationPage != null && ((INavigationPageController)CurrentNavigationPage).StackDepth > 1;
bool navigationPageHasNavigationBar = CurrentNavigationPage != null && NavigationPage.GetHasNavigationBar(CurrentNavigationPage.CurrentPage);
+ //if we have MDP and Navigation , we let navigation choose
+ if (CurrentNavigationPage != null && hasMasterDetailPage)
+ {
+ return NavigationPage.GetHasNavigationBar(CurrentNavigationPage.CurrentPage);
+ }
return navigationPageHasNavigationBar || (hasMasterDetailPage && !navigated);
}