Skip to content

SafeAreaEdges works correctly only on the first tab in Shell. Other tabs have content colliding with the display cutout in the landscape mode. #33034

@holecekp

Description

@holecekp

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:
Image

Image

Steps to Reproduce

  1. Clone the reproduction project and run it on Android (I tested on API 15) on an emulator with a display cutout/notch.
  2. Switch the emulator to the landscape mode so that the cutout is on the left side of the screen.
  3. Open the hamburger menu and select the "Shell Tabs" item from the flyout menu (it's the second one)
  4. The "First tab" is opened and notice that the content is padded correctly and doesn't collide with the display notch/cutout.
  5. 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).

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    i/regressionThis issue described a confirmed regression on a currently supported versionpartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/androidregressed-in-10-rc2s/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions