Xamarin.forms: XAML MasterDetailPage does not work with SplitView

Created on 5 Mar 2018  路  6Comments  路  Source: xamarin/Xamarin.Forms

Description

_Bug that originally started on Bugzilla, I was able to replicate and reproduce the same behavior. Multiple reports from developers experiencing issues with this. Most of the repro steps and data is transferred from https://bugzilla.xamarin.com/show_bug.cgi?id=37737._

The following XAML sample app demonstrates an issue where a master detail page fails with Split View

Steps to Reproduce

  1. Download sample
  2. Deploy to iPad Air 2
  3. Swipe from right to left near right border
  4. Open Photos
  5. Split to 50%
  6. Attempt to manipulate Master/Detail page
  7. Split to 70% XAMLSample/30% Photos
  8. Attempt to manipulate Master/Detail page

Expected Results

Steps 6 and 8 should have the same result

Actual Results

Only Detail page is present on step 6

Basic Information

=== Visual Studio Enterprise 2017 for Mac ===

Version 7.3.3 (build 12)
Installation UUID: 3cd024fe-150e-44e9-80ad-481ef27b390d
Runtime:
Mono 5.4.1.7 (2017-06/e66d9abbb27) (64-bit)
GTK+ 2.24.23 (Raleigh theme)

Package version: 504010007

=== NuGet ===

Version: 4.3.1.4445

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 2.0.0
SDK: /usr/local/share/dotnet/sdk/2.0.0/Sdks
SDK Version: 2.0.0
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.6.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Xamarin.Android ===

Version: 8.1.5.0 (Visual Studio Enterprise)
Android SDK: /Users/ivan/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
6.0 (API level 23)
8.0 (API level 26)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 27.0.1
SDK Build Tools Version: 27.0.3

Java SDK: /usr
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Inspector ===

Version: 1.4.0
Hash: b3f92f9
Branch: master
Build date: Fri, 19 Jan 2018 22:00:34 GMT
Client compatibility: 1

=== Apple Developer Tools ===

Xcode 9.2 (13772)
Build 9C40b

=== Xamarin.iOS ===

Version: 11.6.1.4 (Visual Studio Enterprise)
Hash: db807ec9
Branch: xcode9.2
Build date: 2018-01-10 16:45:48-0500

=== Xamarin.Mac ===

Version: 4.0.0.216 (Visual Studio Enterprise)

=== Build Information ===

Release ID: 703030012
Git revision: b07492f1e48be596bad92dc4b7a3bc2d128ed0f9
Build date: 2018-01-30 13:15:55-05
Xamarin addins: 7c8f967d67207118dd99a1d0cc9c228045b30c5f
Build lane: monodevelop-lion-d15-5

=== Operating System ===

Mac OS X 10.13.1
Darwin 17.2.0 Darwin Kernel Version 17.2.0
Fri Sep 29 18:27:05 PDT 2017
root:xnu-4570.20.62~3/RELEASE_X86_64 x86_64

Video Sample

https://www.dropbox.com/s/35oqw46e0zmvsba/MasterDetailSplit.mov?dl=0

Reproduction Link

https://www.dropbox.com/s/jnruuj4gyl8vufb/Johan%20Hermans%20-%20MasterDetailPage%20bug%20iOS.zip?dl=0

7 help wanted iOS 馃崕 bug up-for-grabs

Most helpful comment

All 6 comments

This bug is now reported since end of 2015 and still not fixed. How is this possible? MasterDetail in Xamarin.Forms with iOS 9.0+ SplitView is still a huge mess. Either the Master is blocking the content the whole time and can not hide or the detail content is full present but the master menu is not opening (depending on screen ratio and orientation). Why is such a old issue not addressed and fixed already? Especially with the new Drag&Drop system of iOS 11 this might be app breaking for some apps.

February 2019 now and this issue, again from 2015, is still open...

This works a little bit better in Shell. The main thing to figure out here is what to do when the user goes to a 70/30 split with the XF application being at 30 percent. Currently it just display the master screen. Testing through a few different apps I see two variations of behavior that people go for

  • They swap the layout out for something that isn't using a UISplitViewController (apple news) so now it's basically just a single ViewController app
  • They transition to a UINavigationController work flow (Notes app). I'm pretty sure this is the default behavior when you use UINavigationController's as your root views for UISplitViewcontroller. The Master and Details page get shifted into a single UINavigationController and then you can navigate between master and details like you are pushing and popping.

So once we resolve this we'll need to just pick one of those for the default and then most likely add a platform specific that propagates the state out to the cross platform application so the developer can swap layouts if they want to.

For example on shell they could have a set of ShellItems for Collapsed mode and a set for non Collapsed mode

@PureWeen is there any ETA on this? Especially because this issue exists 4 years now and users requesting SplitView since the release of iPadOS even more..

@PureWeen this issue is still a thing. Btw. why does it not just behave as a taller iPhone app on a 70:30 split?

Was this page helpful?
0 / 5 - 0 ratings