-
Notifications
You must be signed in to change notification settings - Fork 1.9k
iOS - Icon in Detail of MasterDetail wrong after rotation #4506
Comments
HI @Sauder91 what version of Forms are you using and iOS btw? |
Closing for now. If you can provide a test project then we can reopen. |
I've been working on this issue with Sauder91. Please reopen this issue. Attached is a sample project. It was created using the Master-Detail Forms App template through File, New Solution. The only change in source from the default project created was to change MasterBehavior from Popover to SplitOnLandscape on line 22 in MainPage.xaml.cs. Happy to provide a video with commentary showing the problem. Just ask, it's very easy to reproduce. In testing this, I also found a way to cause a crash, which I've also put below, so there are two issues here, but I'm guessing their are inter-related enough I'll let you know if you'd like me to open an issue just for the crash. Sauder91 mentioned the hamburger icon. Our app uses that image set through IconImageSource, instead of the string "Menu" on the button. I did not include it in the attached project and the behavior was the same and I wanted to provide something to you with minimal changes if you want to create a test project yourself. If needed for your testing, I added the image file to iOS resources and added IconImageSource set to it into the ContentPage properties on line 2 of MenuPage.xaml. Most of issues occur in iOS and the issue happens the same on the Simulator as on an actual device and I'm using the latest Xamarin.Forms (4.1.0.581479). I added Android comments at the bottom. Issue summary:The visibility state of the Menu (or a hamburger icon) doesn't update when a detail view is pushed, then rotated, then popped. Steps to Reproduce:From Portrait
Three ways to fix this and make Menu disappear:
From Landscape
One way to fix the issue:
Now crash the app: And I have one more hint...this crash will only happen if the app was launched in landscape. If I launch in portrait, rotate to landscape and then go through the "From Landscape" steps above, tapping on Menu will work as expected and not crash the app. Only if it wasn't there before the push/rotate/pop sequence does it crash when tapped. Android:From Portrait:
From Landscape: |
Hi @PureWeen, @samhouts and @rmarinho - sorry if this violates protocol for requesting this be reopened. I didn't see any activity on the above after a couple days so thought I'd call attention to this. Please let me know what I should do have have this looked at again. Reproducible case and sample project is in the post above. Thanks. |
Description
We have a MasterDetailPage that is set to SplitOnLandscape. The detail page is a navigation page. If we add a page to the detail navigation stack, rotate the device, then use the back arrow in the detail page the icon in the detail is off. If you off in landscape, upon rotation to portrait and going back the icon will be gone entirely. if you started in portrait upon rotation and going back a hamburger icon will appear.
Steps to Reproduce
Expected Behavior
No icon should be visible when in landscape and a Hamburger should be available in portrait
Actual Behavior
No icon in portrait and hamburger in landscape
Screenshots
The text was updated successfully, but these errors were encountered: