summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.Android
diff options
context:
space:
mode:
authorJason Smith <jason.smith@xamarin.com>2016-05-10 10:37:16 -0700
committerJason Smith <jason.smith@xamarin.com>2016-05-10 10:37:16 -0700
commit2c62350cde629cb972e21dd9cd88095cec40a82f (patch)
treecc68175e528dd1845f445210656f9a471fb488f7 /Xamarin.Forms.Platform.Android
parent5acafedb8e3e2ace8e66f9ff20655d5d96e8ed97 (diff)
downloadxamarin-forms-2c62350cde629cb972e21dd9cd88095cec40a82f.tar.gz
xamarin-forms-2c62350cde629cb972e21dd9cd88095cec40a82f.tar.bz2
xamarin-forms-2c62350cde629cb972e21dd9cd88095cec40a82f.zip
Fix build
Diffstat (limited to 'Xamarin.Forms.Platform.Android')
-rw-r--r--Xamarin.Forms.Platform.Android/AppCompat/MasterDetailContainer.cs15
1 files changed, 8 insertions, 7 deletions
diff --git a/Xamarin.Forms.Platform.Android/AppCompat/MasterDetailContainer.cs b/Xamarin.Forms.Platform.Android/AppCompat/MasterDetailContainer.cs
index de167906..e001389f 100644
--- a/Xamarin.Forms.Platform.Android/AppCompat/MasterDetailContainer.cs
+++ b/Xamarin.Forms.Platform.Android/AppCompat/MasterDetailContainer.cs
@@ -32,13 +32,14 @@ namespace Xamarin.Forms.Platform.Android.AppCompat
{
if (_isMaster)
{
- var width = (int)Context.ToPixels(_parent.MasterBounds.Width);
- // When the base class computes the size of the Master container, it starts at the top of the
- // screen and adds padding (_parent.MasterBounds.Top) to leave room for the status bar
- // When this container is laid out, it's already starting from the adjusted y value of the parent,
- // so we subtract _parent.MasterBounds.Top from our starting point (to get 0) and add it to the
- // bottom (so the master page stretches to the bottom of the screen)
- var height = (int)Context.ToPixels(_parent.MasterBounds.Height + _parent.MasterBounds.Top);
+ var controller = (IMasterDetailPageController)_parent;
+ var width = (int)Context.ToPixels(controller.MasterBounds.Width);
+ // When the base class computes the size of the Master container, it starts at the top of the
+ // screen and adds padding (_parent.MasterBounds.Top) to leave room for the status bar
+ // When this container is laid out, it's already starting from the adjusted y value of the parent,
+ // so we subtract _parent.MasterBounds.Top from our starting point (to get 0) and add it to the
+ // bottom (so the master page stretches to the bottom of the screen)
+ var height = (int)Context.ToPixels(controller.MasterBounds.Height + controller.MasterBounds.Top);
_pageContainer.Layout(0, 0, width, height);
}
else