-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
If the Shell contains multiple tabs, only the safe area works correctly only on the first on Android in the landscape mode. The second and the subsequent tabs are rendered incorrectly. Their content is rendered as if SafeAreaEdges="None" was set and the tab content is partially covered by the display cutout on the left side of the screen. Setting any SafeAreaEdges on the ContentPage or it's root layout has no effect. It seems it's honored only for the first tab. The portrait mode works correctly. The problem is in the landscape mode only.
The following image shows the two tabs. Both of them contains the same page but only the first tab is rendered correctly:

Steps to Reproduce
- Clone the reproduction project and run it on Android (I tested on API 15) on an emulator with a display cutout/notch.
- Switch the emulator to the landscape mode so that the cutout is on the left side of the screen.
- Open the hamburger menu and select the "Shell Tabs" item from the flyout menu (it's the second one)
- The "First tab" is opened and notice that the content is padded correctly and doesn't collide with the display notch/cutout.
- Open the "Second tab". It's the same page but notice that there is no padding and the page content collide with the display notch/cutout. Sometimes it's displayed correctly for the first time, but the issue appears after you switch between the first and the second tab for the first time. Only "Second tab" is affected by this bug. The "First tab" is always displayed correctly.
Link to public reproduction project repository
https://github.com/holecekp/MauiBugSafeAreaEdgesInShell
Version with bug
10.0.11
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
9.0.120 SR12
Affected platforms
Android, I was not able test on other platforms
Affected platform versions
Android API 35. I didn't tested the other Android versions.
Did you find any workaround?
Use .NET 9 until .NET 10 version of MAUI is fixed. The safe area has multiple issues in the landscape mode on Android in generall (for example, #32275).