Skip to content

Grid with SafeAreaEdges=Container has incorrect size when tab bar appears #34256

@oleh-kaliuzhnyi

Description

@oleh-kaliuzhnyi

Description

Empty space appears at the bottom of the page when navigating from a page which has the tab bar hidden to a page which has the tab bar visible.

Steps to Reproduce

  1. Create a new MAUI project with a shell
  2. Create Tab page with the following layout:
    Root Grid layout with SafeAreaEdges="None" and place another Grid (with default SafeAreaEdges which is Container) inside with a long ScrollView in it.
  3. Add the Tab page 2 or more time to the shell as a tab to make the tab bar appear.
  4. Create another page which has the tab bar hidden HiddenTabBarPage.
  5. Setup navigation so the Tab page can navigate next to HiddenTabBarPage. For example:
    Shell.Current.Navigation.PushAsync(new HiddenTabBarPage());
  6. Launch the app on Android 36 API.
  7. Navigate to the next page HiddenTabBarPage and go back

Actual result:
Empty space appears between the nested Grid and the tab bar.

Link to public reproduction project repository

https://github.com/oleh-kaliuzhnyi/SafeAreaContainerIncorrectSize

Version with bug

10.0.40

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

No response

Affected platforms

Android

Affected platform versions

Android API 36

Did you find any workaround?

  1. Subscribe to the Content.SizeChanged event of the page which has the tab bar visible.
  2. Change SafeAreaEdges of the root Grid element to anything different. For example: All.
  3. Change SafeAreaEdges of the root Grid element to its initial value. For example: None

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-shellShell Navigation, Routes, Tabs, Flyoutarea-safeareaIssues/PRs that have to do with the SafeArea functionalityplatform/androids/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