[Android] Fixed SafeAreaEdges issue during Shell Navigation Transition#33788
Merged
PureWeen merged 4 commits intodotnet:mainfrom Feb 2, 2026
Merged
[Android] Fixed SafeAreaEdges issue during Shell Navigation Transition#33788PureWeen merged 4 commits intodotnet:mainfrom
PureWeen merged 4 commits intodotnet:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes safe area inset handling on Android during Shell navigation transitions. The changes address three related issues where safe area padding was incorrectly applied or missing when navigating between tabs or pages in Shell.
Changes:
- Replaced outdated "view extends beyond screen" detection with precise animation state detection logic
- Added detection for Shell navigation animation states by checking view position relative to screen and insets
- Improved code maintainability with additional comments explaining animation detection
- Fixed inset calculation to properly handle views mid-transition
- Added missing import and refactored variable declarations
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Core/src/Platform/Android/SafeAreaExtensions.cs | Core fix: Replaced view-extends-beyond-screen logic with animation-aware inset detection; added detailed comments explaining animation states; improved code formatting with consistent brace placement |
| src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellPageContainer.cs | Added AndroidX.Core.View import (though appears unused in final code) |
src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellPageContainer.cs
Outdated
Show resolved
Hide resolved
Member
|
/azp run maui-pr-uitests, maui-pr-devicetests |
|
Azure Pipelines successfully started running 2 pipeline(s). |
4 tasks
Member
|
/rebase |
6a380db to
0d957c5
Compare
Member
|
/azp run maui-pr-uitests, maui-pr-devicetests |
|
Azure Pipelines successfully started running 2 pipeline(s). |
This was referenced Jan 31, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Member
|
/azp run maui-pr-uitests, maui-pr-devicetests |
|
Azure Pipelines successfully started running 2 pipeline(s). |
This was referenced Feb 1, 2026
Open
Member
|
/azp run maui-pr-uitests, maui-pr-devicetests |
|
Azure Pipelines successfully started running 2 pipeline(s). |
PureWeen
approved these changes
Feb 2, 2026
Member
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
This pull request improves how safe area insets are handled for animated views on Android, particularly during Shell navigation transitions. The changes ensure that insets are correctly applied when views are in motion (e.g., sliding in/out), preventing visual glitches and ensuring that child views receive valid inset data. Additionally, the logic has been refactored for clarity and maintainability.
Safe Area Insets Handling Improvements:
Codebase Maintenance:
AndroidX.Core.Viewimport to support new inset handling features.Test already present in Main
Issues Fixed
Fixes #33034
Fixes #32941
Fixes #33038
Fixes #33731