diff options
author | E.Z. Hart <hartez@users.noreply.github.com> | 2016-05-04 08:22:34 -0600 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2016-05-04 15:22:34 +0100 |
commit | a8acdcc11793c9f44098f2cd478d51677d742945 (patch) | |
tree | 811cf1ee2e2ff0baa8674f116b6b5c08590f56cf /Xamarin.Forms.Platform.Android/Platform.cs | |
parent | 8d383746caab00dd3ee0b62dc992a2a99c7a6d06 (diff) | |
download | xamarin-forms-a8acdcc11793c9f44098f2cd478d51677d742945.tar.gz xamarin-forms-a8acdcc11793c9f44098f2cd478d51677d742945.tar.bz2 xamarin-forms-a8acdcc11793c9f44098f2cd478d51677d742945.zip |
Add IMasterDetailPageController and update renderers (#146)
Diffstat (limited to 'Xamarin.Forms.Platform.Android/Platform.cs')
-rw-r--r-- | Xamarin.Forms.Platform.Android/Platform.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.Android/Platform.cs b/Xamarin.Forms.Platform.Android/Platform.cs index c00b9544..a37929fd 100644 --- a/Xamarin.Forms.Platform.Android/Platform.cs +++ b/Xamarin.Forms.Platform.Android/Platform.cs @@ -32,6 +32,8 @@ namespace Xamarin.Forms.Platform.Android internal static readonly BindableProperty PageContextProperty = BindableProperty.CreateAttached("PageContext", typeof(Context), typeof(Platform), null); + IMasterDetailPageController MasterDetailPageController => CurrentMasterDetailPage as IMasterDetailPageController; + readonly Context _context; readonly PlatformRenderer _renderer; @@ -378,7 +380,7 @@ namespace Xamarin.Forms.Platform.Android } else if (CurrentMasterDetailPage != null) { - if (CurrentMasterDetailPage.ShouldShowSplitMode && CurrentMasterDetailPage.IsPresented) + if (MasterDetailPageController.ShouldShowSplitMode && CurrentMasterDetailPage.IsPresented) return; CurrentMasterDetailPage.IsPresented = !CurrentMasterDetailPage.IsPresented; } @@ -480,7 +482,7 @@ namespace Xamarin.Forms.Platform.Android return; } if (!CurrentMasterDetailPage.ShouldShowToolbarButton() || string.IsNullOrEmpty(CurrentMasterDetailPage.Master.Icon) || - (CurrentMasterDetailPage.ShouldShowSplitMode && CurrentMasterDetailPage.IsPresented)) + (MasterDetailPageController.ShouldShowSplitMode && CurrentMasterDetailPage.IsPresented)) { //clear out existing icon; ClearMasterDetailToggle(); |