summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android/Renderers/MasterDetailContainer.cs
diff options
context:
space:
mode:
authorRui Marinho <me@ruimarinho.net>2016-06-17 19:55:06 +0100
committerJason Smith <jason.smith@xamarin.com>2016-06-17 11:55:06 -0700
commit934083393287f156bb4eeb5df817618bff89c03d (patch)
tree952475e69d8dc073f0164791737cadff32424075 /Xamarin.Forms.Platform.Android/Renderers/MasterDetailContainer.cs
parentdae4dfa94c71246bfc597d23449a6ba43e5255ff (diff)
downloadxamarin-forms-934083393287f156bb4eeb5df817618bff89c03d.tar.gz
xamarin-forms-934083393287f156bb4eeb5df817618bff89c03d.tar.bz2
xamarin-forms-934083393287f156bb4eeb5df817618bff89c03d.zip
[Android] Take in account status bar padding on master when using split behaviour in MDP (#226)
Diffstat (limited to 'Xamarin.Forms.Platform.Android/Renderers/MasterDetailContainer.cs')
-rw-r--r--Xamarin.Forms.Platform.Android/Renderers/MasterDetailContainer.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.Android/Renderers/MasterDetailContainer.cs b/Xamarin.Forms.Platform.Android/Renderers/MasterDetailContainer.cs
index 9184e269..7e28392f 100644
--- a/Xamarin.Forms.Platform.Android/Renderers/MasterDetailContainer.cs
+++ b/Xamarin.Forms.Platform.Android/Renderers/MasterDetailContainer.cs
@@ -120,6 +120,7 @@ namespace Xamarin.Forms.Platform.Android
double width = Context.FromPixels(right - left);
double height = Context.FromPixels(bottom - top);
double xPos = 0;
+ bool supressPadding = false;
//splitview
if (MasterDetailPageController.ShouldShowSplitMode)
@@ -131,11 +132,13 @@ namespace Xamarin.Forms.Platform.Android
}
else
{
+ //if we are showing the normal popover master doesn't have padding
+ supressPadding = isMasterPage;
//popover make the master smaller
width = isMasterPage && (Device.Info.CurrentOrientation.IsLandscape() || Device.Idiom == TargetIdiom.Tablet) ? DefaultWidthMaster : width;
}
- double padding = Context.FromPixels(TopPadding);
+ double padding = supressPadding ? 0 : Context.FromPixels(TopPadding);
return new Rectangle(xPos, padding, width, height - padding);
}