Skip to content

[Android] Shell Flyout: Apply safe-area insets to the flyout container - #34510

Merged
kubaflo merged 6 commits into
dotnet:inflight/currentfrom
devanathan-vaithiyanathan:android-Shell-Flyout-SafeArea
Jun 22, 2026
Merged

kubaflo merged 6 commits into
dotnet:inflight/currentfrom
devanathan-vaithiyanathan:android-Shell-Flyout-SafeArea

Conversation

@devanathan-vaithiyanathan

@devanathan-vaithiyanathan devanathan-vaithiyanathan commented Mar 17, 2026 •

Copy link
Copy Markdown
Contributor

Issue Details

On Android, Shell flyout content was not consistently offset for SystemBars/DisplayCutout insets in landscape mode. That left flyout items exposed to the notch and status bar area.

Description of Change

This change simplifies ShellFlyoutTemplatedContentRenderer.WindowsListener so the flyout CoordinatorLayout consumes the window insets and applies the max of SystemBars and DisplayCutout insets as padding on the container itself.

That replaces the older per-subview logic that separately adjusted the app bar, flyout content, footer, and background image.

Issues Fixed

Fixes #32275

Before After
Android
Android-Before.mov
Android
Android-After.mov

@github-actions

github-actions Bot commented Mar 17, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34510

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34510"

@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Mar 17, 2026
@devanathan-vaithiyanathan
devanathan-vaithiyanathan marked this pull request as ready for review March 17, 2026 08:34
Copilot AI review requested due to automatic review settings March 17, 2026 08:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts Android Shell flyout insets handling so flyout content respects safe-area/system insets (notch/status bar), addressing the reported landscape collision regression.

Changes:

  • Simplifies WindowsListener inset application to pad the flyout CoordinatorLayout using the max of SystemBars and DisplayCutout insets (left/top/right/bottom).
  • Removes per-subview inset handling (flyout view/footer/bg image/appbar special-casing) and associated weak-reference plumbing.
  • Updates listener instantiation and removes now-unused listener property assignments.

You can also share your feedback on Copilot code review. Take the survey.

@sheiksyedm sheiksyedm added community ✨ Community Contribution area-safearea Issues/PRs that have to do with the SafeArea functionality platform/android labels Mar 17, 2026
@kubaflo kubaflo added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-gate-failed AI could not verify tests catch the bug s/agent-fix-win AI found a better alternative fix than the PR s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Mar 17, 2026
@devanathan-vaithiyanathan devanathan-vaithiyanathan changed the title [Android] Fix Shell Flyout SafeArea Rendering [Android] Shell Flyout: Apply safe-area insets to the flyout container Mar 18, 2026
@devanathan-vaithiyanathan

Copy link
Copy Markdown
Contributor Author

🤖 AI Summary

📊 Expand Full Review — 78a9b4f · android shell flyout fix added
🔍 Pre-Flight — Context & Validation
Issue: #32275 - [NET10] SafeAreaEdges cannot be set for Shell and the flyout menu collides with display notch and status bar in landscape mode PR: #34510 - [Android] Fix Shell Flyout SafeArea Rendering Platforms Affected: Android (Android 15 emulator; landscape flyout safe-area regression) Files Changed: 1 implementation, 0 test

Key Findings

  • The linked issue is an Android Shell flyout regression introduced in .NET 10 RC2: when rotated to landscape, the open flyout ignores left/top safe-area insets and collides with the notch/status bar.
  • Issue discussion adds an edge case around Shell pages with a root ScrollView, where navigating away and back in landscape can also leave content covered by the cutout.
  • PR [Android] Fix Shell Flyout SafeArea Rendering #34510 changes only src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs and adds no UI, device, or unit tests.
  • The PR simplifies flyout inset handling by padding the flyout CoordinatorLayout with the max of SystemBars and DisplayCutout insets, removing the previous per-subview special casing.
  • Inline review feedback flags two concerns: a stale comment claiming the flyout should not be inset, and possible footer-width/layout issues when left/right padding is applied to the parent container.
  • No prior agent review summary was found in the PR discussion.

Fix Candidates

Source Approach Test Result Files Changed Notes

PR PR #34510 Apply system/display-cutout padding directly to the flyout CoordinatorLayout and remove child-specific inset plumbing. ⏳ PENDING (Gate) src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs Original PR; no tests included in the PR.
🚦 Gate — Test Verification

Gate Result: ⚠️ SKIPPED

Result: ❌ SKIPPED

Platform: android Mode: Full Verification

  • Tests FAIL without fix: ❌
  • Tests PASS with fix: ❌

No PR-added test files were found under TestCases.HostApp or TestCases.Shared.Tests, so full fail-without-fix/pass-with-fix verification could not be executed for this review. The PR should add or reference a reproducible UI test for the Shell flyout landscape safe-area regression.

🔧 Fix — Analysis & Comparison

Fix Candidates

Source Approach Test Result Files Changed Notes

1 try-fix (claude-opus-4.6) Preserve the old per-element inset logic and add missing left/right inset propagation instead of padding the entire coordinator uniformly. ❌ FAIL 1 file 189/190 Shell tests passed; ShouldFlyoutTextWrapsInLandscape screenshot diff (7.96%) shows broad horizontal inset use changes baseline-sensitive layout.
2 try-fix (claude-sonnet-4.6) Apply displayCutout.Left only to flyout children (app bar, flyout content, background) while preserving the existing footer-aware structure. ✅ PASS 1 file 190/190 Shell tests passed; simplest passing fix and avoids the coordinator/footer width coupling concern.
3 try-fix (gpt-5.3-codex) Make child margins and footer width inset-aware instead of changing coordinator padding. ❌ FAIL 1 file Build/deploy succeeded, but the Android Shell test run stalled before completion.
4 try-fix (gemini-3-pro-preview) Apply display-cutout horizontal padding at child level and keep top/bottom handling separate. ✅ PASS 1 file 190/190 Shell tests passed; valid, but more invasive than candidate #2.
5 try-fix (claude-opus-4.6) Shrink flyout width using safe bounds/WindowMetrics and offset it horizontally instead of padding. ❌ FAIL 1 file Broke dynamic flyout sizing (Shell.FlyoutWidth) and failed 4 Shell tests.
PR PR #34510 Apply system/display-cutout padding directly to the flyout CoordinatorLayout and remove child-specific inset plumbing. ⚠️ NOT VERIFIED 1 file Gate skipped because the PR includes no verification test; inline review also raised footer-width/layout concerns.

Cross-Pollination

Model Round New Ideas? Details
claude-opus-4.6 2 Yes NEW IDEA: compute flyout width from WindowMetrics safe bounds and offset X instead of padding/margins. Tested as Candidate #5 and failed.
claude-sonnet-4.6 2 No NO NEW IDEAS
gpt-5.3-codex 2 No NO NEW IDEAS
gemini-3-pro-preview 2 No NO NEW IDEAS
Exhausted: Yes Selected Fix: Candidate #2 — it is the simplest passing alternative, preserves the established footer/layout behavior, and avoids the PR's coordinator-level horizontal padding risk.

📋 Report — Final Recommendation

⚠️ Final Recommendation: REQUEST CHANGES

Final Recommendation: REQUEST CHANGES

Phase Status

Phase Status Notes
Pre-Flight ✅ COMPLETE Android Shell flyout safe-area regression documented from issue #32275; PR changes one implementation file and adds no tests.
Gate ⚠️ SKIPPED Android; full FAIL-without-fix / PASS-with-fix verification could not run because the PR includes no UI test for the regression.
Try-Fix ✅ COMPLETE 5 attempts total, 2 passing alternatives; Candidate #2 selected as the best validated fix.
Report ✅ COMPLETE

Summary

PR #34510 targets the correct Android Shell flyout regression, but it arrives without a dedicated verification test and chooses a broader coordinator-level padding approach than necessary. The mandatory try-fix exploration found a simpler passing alternative that keeps the existing per-child/footer-aware layout model and only injects DisplayCutout.Left into the flyout children, passing 190/190 Android Shell tests.

Root Cause

The regression appears to be that the Shell flyout no longer respects the landscape display cutout on Android, so content can start underneath the notch/status region. However, broad use of SystemBars horizontal insets also captures landscape navigation-bar space on the emulator, shrinking the flyout enough to change text wrapping and screenshot baselines. Applying horizontal insets at the wrong layout level also risks breaking footer sizing because UpdateFooterLayout() uses _flyoutWidth as an exact width.

Fix Quality

The PR's current fix is not sufficiently verified and may be over-broad: it pads the entire CoordinatorLayout on all sides, removes the prior footer/appbar/background-specific handling, and leaves an open review concern about footer layout under left/right padding. Candidate #2 demonstrates that a narrower child-level cutout fix can satisfy current Shell coverage without disturbing footer width semantics. This PR should be revised toward that smaller strategy and should add a reproducible UI test for #32275 so Gate can perform full fail-without-fix/pass-with-fix validation.

📋 Expand PR Finalization Review

PR #34510 Finalization Review

Title Review

Current: [Android] Fix Shell Flyout SafeArea Rendering

Assessment: Good direction, but a bit generic for a squash/merge commit title.

Recommended title: [Android] Shell Flyout: Apply safe-area insets to the flyout container

Why:

  • Keeps the Android scope.
  • Names the affected component (Shell Flyout).
  • Describes the actual implementation change rather than just saying "fix".

Description Review

Assessment: The current description is too light for merge.

What is good:

  • It identifies the affected area (Shell Flyout).
  • It links the right issue (Fixes #32275).
  • It states the user-visible goal (render within safe area in portrait/landscape).

What is missing:

  • The required NOTE block at the top.
  • The root cause.
  • The actual implementation detail: the PR removes the prior per-subview inset handling and instead applies all system-bar/display-cutout insets as padding on the flyout CoordinatorLayout.
  • Any mention of potential side effects or behavior changes for footer/background/header layout.

Recommended Description

[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Root Cause

On Android, Shell flyout content was not consistently offset for SystemBars/DisplayCutout insets in landscape mode. That left flyout items exposed to the notch and status bar area.

Description of Change

This change simplifies ShellFlyoutTemplatedContentRenderer.WindowsListener so the flyout CoordinatorLayout consumes the window insets and applies the max of SystemBars and DisplayCutout insets as padding on the container itself.

That replaces the older per-subview logic that separately adjusted the app bar, flyout content, footer, and background image.

Key Technical Details

  • ShellFlyoutTemplatedContentRenderer.WindowsListener now computes left, top, right, and bottom insets from SystemBars and DisplayCutout.
  • The listener applies those values with v.SetPadding(leftInset, topInset, rightInset, bottomInset) on the flyout CoordinatorLayout.
  • The PR removes the older weak-reference plumbing for FlyoutView, FooterView, and the background image.

Issues Fixed

Fixes #32275

Code Review Findings

🔴 Important issue

Footer sizing does not match the new padded container model

  • File: src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs
  • Relevant code: WindowsListener.OnApplyWindowInsets() and UpdateFooterLayout()
  • Problem: The new implementation applies left/right padding to the parent CoordinatorLayout, but UpdateFooterLayout() still sizes the footer using _flyoutWidth, which is the full measured width of the flyout view. That means the footer can still be laid out against the unpadded width instead of the padded content width.
  • Why this matters: The main issue is about flyout content respecting the safe area. With a flyout footer present, the footer can still extend into or align against the unsafe inset region, which breaks the same layout model the PR is trying to enforce.
  • Recommendation: Base the footer width on the available content width (_flyoutWidth - _rootView.PaddingLeft - _rootView.PaddingRight) or switch the footer layout params to MatchParent so it naturally follows the parent padding.

🟡 Suggestions

  • Update the inline comment above the inset logic. It currently says the flyout overlaps the status bar so insetting it is not important, but the new code now explicitly applies top/left/right/bottom insets.
  • Add a targeted UI test for Android Shell flyout landscape safe-area behavior, ideally covering a flyout with a footer, since this change alters container-level layout rather than just content placement.

Overall Assessment

  • Metadata: Needs improvement before merge. The title is acceptable but can be more specific; the description should be expanded and should include the required NOTE block.
  • Code: The simplification is understandable and CI is green, but I do not consider this fully ready for merge until the footer-width interaction with parent padding is addressed or proven safe.

@kubaflo , I have addressed the AI review summary.

@devanathan-vaithiyanathan

Copy link
Copy Markdown
Contributor Author

🤖 AI Summary

📊 Expand Full Review — bf74de2 · co pilot changes added
🔍 Pre-Flight — Context & Validation
Issue: #32275 - [NET10] SafeAreaEdges cannot be set for Shell and the flyout menu collides with display notch and status bar in landscape mode PR: #34510 - [Android] Fix Shell Flyout SafeArea Rendering Platforms Affected: Android (Android 15 emulator; landscape flyout safe-area regression) Files Changed: 1 implementation, 0 test

Key Findings

  • The linked issue is an Android Shell flyout regression introduced in .NET 10 RC2: when rotated to landscape, the open flyout ignores left/top safe-area insets and collides with the notch/status bar.
  • Issue discussion adds an edge case around Shell pages with a root ScrollView, where navigating away and back in landscape can also leave content covered by the cutout.
  • PR [Android] Shell Flyout: Apply safe-area insets to the flyout container #34510 changes only src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs and adds no UI, device, or unit tests.
  • The PR simplifies flyout inset handling by padding the flyout CoordinatorLayout with the max of SystemBars and DisplayCutout insets, removing the previous per-subview special casing.
  • Inline review feedback flags two concerns: a stale comment claiming the flyout should not be inset, and possible footer-width/layout issues when left/right padding is applied to the parent container.
  • No prior agent review summary was found in the PR discussion.

Fix Candidates

Source Approach Test Result Files Changed Notes

PR PR #34510 Apply system/display-cutout padding directly to the flyout CoordinatorLayout and remove child-specific inset plumbing. ⏳ PENDING (Gate) src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs Original PR; no tests included in the PR.
Issue: #32275 - [NET10] SafeAreaEdges cannot be set for Shell and the flyout menu collides with display notch and status bar in landscape mode PR: #34510 - [Android] Shell Flyout: Apply safe-area insets to the flyout container Platforms Affected: Android (Android 15 emulator; Shell flyout in landscape) Files Changed: 1 implementation, 0 test

Key Findings

  • The linked issue is an Android Shell flyout regression in landscape mode: flyout items can render under the display cutout/status bar.
  • The PR changes only src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs; it does not add UI, device, or unit tests.
  • A prior agent review summary exists in the PR discussion and was imported for this review. It already ran the mandatory try-fix exploration on the earlier core approach.
  • The PR was updated after that earlier review via commits 6e419cba and bf74de23, which addressed the stale comment, changed footer width handling to LP.MatchParent, and removed an unnecessary stored listener field.
  • Those follow-up commits do not change the central strategy: the PR still applies max SystemBars/DisplayCutout padding directly to the root CoordinatorLayout.
  • Current-diff review shows a remaining correctness risk: _bgImage is a MATCH_PARENT child of the padded CoordinatorLayout, so FlyoutBackgroundImage can stop covering the top safe-area/status-bar region.

Fix Candidates

Source Approach Test Result Files Changed Notes

PR PR #34510 Apply max SystemBars/DisplayCutout insets as root CoordinatorLayout padding; keep footer width aligned with parent padding via LP.MatchParent. ⏳ PENDING / Gate skipped src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs Current PR head includes follow-up commits addressing earlier comment/footer-review feedback.
🚦 Gate — Test Verification

Gate Result: ⚠️ SKIPPED

Result: ❌ SKIPPED

Platform: android Mode: Full Verification

  • Tests FAIL without fix: ❌
  • Tests PASS with fix: ❌

No PR-added test files were found under TestCases.HostApp or TestCases.Shared.Tests, so full fail-without-fix/pass-with-fix verification could not be executed for this review. The PR should add or reference a reproducible UI test for the Shell flyout landscape safe-area regression.

Gate Result: ⚠️ SKIPPED

Platform: android Mode: Full Verification

  • Tests FAIL without fix: ❌
  • Tests PASS with fix: ❌

Gate was skipped because PR #34510 adds no files under TestCases.HostApp or TestCases.Shared.Tests, so there is no PR-added regression test for #32275 to run through verify-tests-fail-without-fix.

A task agent confirmed the skip condition: the PR changes only src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs and contains no qualifying UI test additions.

🔧 Fix — Analysis & Comparison

Gate Result: ⚠️ SKIPPED

Result: ❌ SKIPPED

Platform: android Mode: Full Verification

  • Tests FAIL without fix: ❌
  • Tests PASS with fix: ❌

No PR-added test files were found under TestCases.HostApp or TestCases.Shared.Tests, so full fail-without-fix/pass-with-fix verification could not be executed for this review. The PR should add or reference a reproducible UI test for the Shell flyout landscape safe-area regression.

Fix Candidates

Imported from the prior agent review summary in the PR discussion after verifying that later commits only adjusted comment/footer/listener details and did not change the core root-padding strategy under review.

Source Approach Test Result Files Changed Notes

1 try-fix (claude-opus-4.6) Preserve the old per-element inset logic and add missing left/right inset propagation instead of padding the entire coordinator uniformly. ❌ FAIL 1 file 189/190 Shell tests passed; ShouldFlyoutTextWrapsInLandscape screenshot diff (7.96%) showed the broader horizontal inset change affecting layout baselines.
2 try-fix (claude-sonnet-4.6) Apply displayCutout.Left only to flyout children (app bar, flyout content, background) while preserving the existing footer-aware structure. ✅ PASS 1 file 190/190 Shell tests passed; simplest passing alternative and avoids root-padding side effects.
3 try-fix (gpt-5.3-codex) Make child margins and footer width inset-aware instead of changing coordinator padding. ❌ FAIL 1 file Build/deploy succeeded, but the Android Shell test run stalled before completion.
4 try-fix (gemini-3-pro-preview) Apply display-cutout horizontal padding at child level and keep top/bottom handling separate. ✅ PASS 1 file 190/190 Shell tests passed; valid but more invasive than candidate #2.
5 try-fix (claude-opus-4.6, round 2) Shrink flyout width using safe bounds/WindowMetrics and offset it horizontally instead of padding/margins. ❌ FAIL 1 file Broke dynamic flyout sizing (Shell.FlyoutWidth) and failed 4 Shell tests.
PR PR #34510 Apply max SystemBars/DisplayCutout padding directly to the root CoordinatorLayout, with footer width changed to LP.MatchParent in follow-up review fixes. ⚠️ NOT VERIFIED 1 file Gate was skipped because the PR still adds no issue-specific regression test. Current-diff review also found a FlyoutBackgroundImage coverage regression risk caused by root padding.

Cross-Pollination

Model Round New Ideas? Details
claude-opus-4.6 2 Yes NEW IDEA: compute flyout width from WindowMetrics safe bounds and offset X instead of padding/margins. Tested as candidate #5 and failed.
claude-sonnet-4.6 2 No NO NEW IDEAS
gpt-5.3-codex 2 No NO NEW IDEAS
gemini-3-pro-preview 2 No NO NEW IDEAS
Exhausted: Yes Selected Fix: Candidate #2 — it is the simplest passing alternative, preserves the established footer/background-aware layout model, and avoids the measurement side effects introduced by root-level horizontal padding.

📋 Report — Final Recommendation

⚠️ Final Recommendation: REQUEST CHANGES

Final Recommendation: REQUEST CHANGES

Phase Status

Phase Status Notes
Pre-Flight ✅ COMPLETE Android Shell flyout safe-area regression documented from issue #32275; PR changes one implementation file and adds no tests.
Gate ⚠️ SKIPPED Android; full FAIL-without-fix / PASS-with-fix verification could not run because the PR includes no UI test for the regression.
Try-Fix ✅ COMPLETE 5 attempts total, 2 passing alternatives; Candidate #2 selected as the best validated fix.
Report ✅ COMPLETE

Summary

PR #34510 targets the correct Android Shell flyout regression, but it arrives without a dedicated verification test and chooses a broader coordinator-level padding approach than necessary. The mandatory try-fix exploration found a simpler passing alternative that keeps the existing per-child/footer-aware layout model and only injects DisplayCutout.Left into the flyout children, passing 190/190 Android Shell tests.

Root Cause

The regression appears to be that the Shell flyout no longer respects the landscape display cutout on Android, so content can start underneath the notch/status region. However, broad use of SystemBars horizontal insets also captures landscape navigation-bar space on the emulator, shrinking the flyout enough to change text wrapping and screenshot baselines. Applying horizontal insets at the wrong layout level also risks breaking footer sizing because UpdateFooterLayout() uses _flyoutWidth as an exact width.

Fix Quality

The PR's current fix is not sufficiently verified and may be over-broad: it pads the entire CoordinatorLayout on all sides, removes the prior footer/appbar/background-specific handling, and leaves an open review concern about footer layout under left/right padding. Candidate #2 demonstrates that a narrower child-level cutout fix can satisfy current Shell coverage without disturbing footer width semantics. This PR should be revised toward that smaller strategy and should add a reproducible UI test for #32275 so Gate can perform full fail-without-fix/pass-with-fix validation.

⚠️ Final Recommendation: REQUEST CHANGES

Phase Status

Phase Status Notes
Pre-Flight ✅ COMPLETE Imported issue/PR context, confirmed post-review follow-up commits, and reviewed the current diff.
Gate ⚠️ SKIPPED Android; no PR-added TestCases.HostApp / TestCases.Shared.Tests regression test exists for #32275.
Try-Fix ✅ COMPLETE Imported prior mandatory multi-model exploration; 5 candidates total, 2 passing alternatives, candidate #2 selected.
Report ✅ COMPLETE

Summary

PR #34510 targets the right Android Shell flyout regression and already addressed two earlier review items in follow-up commits: the stale inset comment and footer sizing now using LP.MatchParent. However, the current diff still has a substantive correctness issue and no dedicated regression test, so it is not ready to approve.

Root Cause

The issue is about landscape Shell flyout content rendering under the display cutout / status bar on Android. The PR solves this by moving inset handling to the root CoordinatorLayout, but that changes measurement semantics for every MATCH_PARENT child under the flyout. In particular, _bgImage is added as a direct child of the padded root view, so FlyoutBackgroundImage can stop extending into the top safe-area/status-bar strip and leave that region painted only by the container background instead of the configured image.

Fix Quality

The current PR is cleaner than the original revision, but the root-padding strategy still looks too broad and remains unverified by an issue-specific test. The imported try-fix exploration found a simpler passing alternative (candidate #2) that keeps the existing child-level/footer-aware model and limits the horizontal adjustment to the cutout-sensitive content instead of the whole container. This PR should be revised toward that narrower approach and should add a reproducible Android UI regression test for #32275 so Gate can perform fail-without-fix / pass-with-fix verification.

Current-Diff Blocking Issue

  • src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs: applying padding directly to the root CoordinatorLayout causes the MATCH_PARENT _bgImage child to be measured inside the padded content bounds rather than the full flyout bounds, so FlyoutBackgroundImage no longer reliably covers the top inset/status-bar region.

📋 Expand PR Finalization Review

PR #34510 Finalization Review

Title Review

Current: [Android] Fix Shell Flyout SafeArea Rendering

Assessment: Good direction, but a bit generic for a squash/merge commit title.

Recommended title: [Android] Shell Flyout: Apply safe-area insets to the flyout container

Why:

  • Keeps the Android scope.
  • Names the affected component (Shell Flyout).
  • Describes the actual implementation change rather than just saying "fix".

Description Review

Assessment: The current description is too light for merge.

What is good:

  • It identifies the affected area (Shell Flyout).
  • It links the right issue (Fixes #32275).
  • It states the user-visible goal (render within safe area in portrait/landscape).

What is missing:

  • The required NOTE block at the top.
  • The root cause.
  • The actual implementation detail: the PR removes the prior per-subview inset handling and instead applies all system-bar/display-cutout insets as padding on the flyout CoordinatorLayout.
  • Any mention of potential side effects or behavior changes for footer/background/header layout.

Recommended Description

[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Root Cause

On Android, Shell flyout content was not consistently offset for SystemBars/DisplayCutout insets in landscape mode. That left flyout items exposed to the notch and status bar area.

Description of Change

This change simplifies ShellFlyoutTemplatedContentRenderer.WindowsListener so the flyout CoordinatorLayout consumes the window insets and applies the max of SystemBars and DisplayCutout insets as padding on the container itself.

That replaces the older per-subview logic that separately adjusted the app bar, flyout content, footer, and background image.

Key Technical Details

  • ShellFlyoutTemplatedContentRenderer.WindowsListener now computes left, top, right, and bottom insets from SystemBars and DisplayCutout.
  • The listener applies those values with v.SetPadding(leftInset, topInset, rightInset, bottomInset) on the flyout CoordinatorLayout.
  • The PR removes the older weak-reference plumbing for FlyoutView, FooterView, and the background image.

Issues Fixed

Fixes #32275

Code Review Findings

🔴 Important issue

Footer sizing does not match the new padded container model

  • File: src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs
  • Relevant code: WindowsListener.OnApplyWindowInsets() and UpdateFooterLayout()
  • Problem: The new implementation applies left/right padding to the parent CoordinatorLayout, but UpdateFooterLayout() still sizes the footer using _flyoutWidth, which is the full measured width of the flyout view. That means the footer can still be laid out against the unpadded width instead of the padded content width.
  • Why this matters: The main issue is about flyout content respecting the safe area. With a flyout footer present, the footer can still extend into or align against the unsafe inset region, which breaks the same layout model the PR is trying to enforce.
  • Recommendation: Base the footer width on the available content width (_flyoutWidth - _rootView.PaddingLeft - _rootView.PaddingRight) or switch the footer layout params to MatchParent so it naturally follows the parent padding.

🟡 Suggestions

  • Update the inline comment above the inset logic. It currently says the flyout overlaps the status bar so insetting it is not important, but the new code now explicitly applies top/left/right/bottom insets.
  • Add a targeted UI test for Android Shell flyout landscape safe-area behavior, ideally covering a flyout with a footer, since this change alters container-level layout rather than just content placement.

Overall Assessment

  • Metadata: Needs improvement before merge. The title is acceptable but can be more specific; the description should be expanded and should include the required NOTE block.
  • Code: The simplification is understandable and CI is green, but I do not consider this fully ready for merge until the footer-width interaction with parent padding is addressed or proven safe.

Based on Suggestion modified the description and footer layout params to MatchParent

@sheiksyedm

Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests , maui-pr-devicetests

@sheiksyedm sheiksyedm added the s/agent-suggestions-implemented Maintainer applies when PR author adopts agent's recommendation label Mar 19, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 2 pipeline(s).

@kubaflo kubaflo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please review the ai's summary?

@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Jun 21, 2026
@MauiBot MauiBot added s/agent-gate-passed AI verified tests catch the bug (fail without fix, pass with fix) and removed s/agent-gate-failed AI could not verify tests catch the bug labels Jun 21, 2026

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review Summary

@devanathan-vaithiyanathan — new AI review results are available based on this last commit: 6c91a14. To request a fresh review after new comments or commits, comment /review rerun.

Gate Passed Confidence Low Platform Android


🚀 Next Steps — review latest findings

No alternative fix was selected for this run. Review the session findings and CI results before merging.

🗂️ Review Sessions — click to expand
🧪 Gate — Test Before & After Fix

Gate Result: ✅ PASSED

Platform: ANDROID · Base: main · Merge base: 4567a055

Test Without Fix (expect FAIL) With Fix (expect PASS)
🖥️ Issue32275 Issue32275 ✅ FAIL — 1050s ✅ PASS — 854s
🔴 Without fix — 🖥️ Issue32275: FAIL ✅ · 1050s

(truncated to last 15,000 chars)

Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
    at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
    at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
    at Microsoft.Maui.TestCases.Tests._IssuesUITest.NavigateToIssue(String issue) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 54
    at Microsoft.Maui.TestCases.Tests._IssuesUITest.TryToResetTestState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 25
    at Microsoft.Maui.TestCases.Tests.UITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 576

>>>>> 06/21/2026 19:32:25 VerifyCustomFlyoutContentRendering Start
>>>>> 06/21/2026 19:32:25 FixtureSetup for VerifyCustomFlyoutContentRendering
>>>>> 06/21/2026 19:32:41 The FixtureSetup threw an exception. Attempt 0/1.
Exception details: System.TimeoutException: Shell Flyout SafeArea Rendering
   at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.NavigateToIssue(String issue) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 54
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.TryToResetTestState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 25
   at Microsoft.Maui.TestCases.Tests.UITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 576
>>>>> 06/21/2026 19:32:43 FixtureSetup for VerifyCustomFlyoutContentRendering
>>>>> 06/21/2026 19:32:59 The FixtureSetup threw an exception. Attempt 1/1.
Exception details: System.TimeoutException: Shell Flyout SafeArea Rendering
   at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.NavigateToIssue(String issue) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 54
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.TryToResetTestState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 25
   at Microsoft.Maui.TestCases.Tests.UITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 576
>>>>> 06/21/2026 19:32:59 VerifyCustomFlyoutContentRendering Stop
>>>>> 06/21/2026 19:32:59 Log types: logcat, bugreport, server
>>>>> 06/21/2026 19:33:00 Log types: logcat, bugreport, server
  Failed VerifyCustomFlyoutContentRendering [34 s]
  Error Message:
   The app was expected to be running still, investigate as possible crash
TearDown : The app was expected to be running still, investigate as possible crash
  Stack Trace:
     at UITest.Appium.NUnit.UITestBase.UITestBaseTearDown() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 159
   at UITest.Appium.NUnit.UITestBase.TestTearDown() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 45
   at InvokeStub_UITestBase.TestTearDown(Object, Object, IntPtr*)

--TearDown
   at UITest.Appium.NUnit.UITestBase.UITestBaseTearDown() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 159
   at UITest.Appium.NUnit.UITestBase.TestTearDown() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 45
   at InvokeStub_UITestBase.TestTearDown(Object, Object, IntPtr*)

1)    at UITest.Appium.NUnit.UITestBase.UITestBaseTearDown() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 159
   at UITest.Appium.NUnit.UITestBase.TestTearDown() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 45
   at InvokeStub_UITestBase.TestTearDown(Object, Object, IntPtr*)


  Standard Error Messages:
 >>>>> 06/21/2026 19:32:41 The FixtureSetup threw an exception. Attempt 0/1.
 Exception details: System.TimeoutException: Shell Flyout SafeArea Rendering
    at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
    at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
    at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
    at Microsoft.Maui.TestCases.Tests._IssuesUITest.NavigateToIssue(String issue) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 54
    at Microsoft.Maui.TestCases.Tests._IssuesUITest.TryToResetTestState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 25
    at Microsoft.Maui.TestCases.Tests.UITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 576
 >>>>> 06/21/2026 19:32:59 The FixtureSetup threw an exception. Attempt 1/1.
 Exception details: System.TimeoutException: Shell Flyout SafeArea Rendering
    at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
    at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
    at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
    at Microsoft.Maui.TestCases.Tests._IssuesUITest.NavigateToIssue(String issue) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 54
    at Microsoft.Maui.TestCases.Tests._IssuesUITest.TryToResetTestState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 25
    at Microsoft.Maui.TestCases.Tests.UITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 576

>>>>> 06/21/2026 19:33:00 VerifyCustomFlyoutContentWithHeaderFooter Start
>>>>> 06/21/2026 19:33:00 FixtureSetup for VerifyCustomFlyoutContentWithHeaderFooter
>>>>> 06/21/2026 19:33:15 The FixtureSetup threw an exception. Attempt 0/1.
Exception details: System.TimeoutException: Shell Flyout SafeArea Rendering
   at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.NavigateToIssue(String issue) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 54
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.TryToResetTestState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 25
   at Microsoft.Maui.TestCases.Tests.UITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 576
>>>>> 06/21/2026 19:33:17 FixtureSetup for VerifyCustomFlyoutContentWithHeaderFooter
>>>>> 06/21/2026 19:33:34 The FixtureSetup threw an exception. Attempt 1/1.
Exception details: System.TimeoutException: Shell Flyout SafeArea Rendering
   at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
   at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
   at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.NavigateToIssue(String issue) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 54
   at Microsoft.Maui.TestCases.Tests._IssuesUITest.TryToResetTestState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 25
   at Microsoft.Maui.TestCases.Tests.UITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 576
>>>>> 06/21/2026 19:33:34 VerifyCustomFlyoutContentWithHeaderFooter Stop
>>>>> 06/21/2026 19:33:34 Log types: logcat, bugreport, server
>>>>> 06/21/2026 19:33:34 Log types: logcat, bugreport, server
  Failed VerifyCustomFlyoutContentWithHeaderFooter [34 s]
  Error Message:
   The app was expected to be running still, investigate as possible crash
TearDown : The app was expected to be running still, investigate as possible crash
  Stack Trace:
     at UITest.Appium.NUnit.UITestBase.UITestBaseTearDown() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 159
   at UITest.Appium.NUnit.UITestBase.TestTearDown() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 45
   at InvokeStub_UITestBase.TestTearDown(Object, Object, IntPtr*)

--TearDown
   at UITest.Appium.NUnit.UITestBase.UITestBaseTearDown() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 159
   at UITest.Appium.NUnit.UITestBase.TestTearDown() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 45
   at InvokeStub_UITestBase.TestTearDown(Object, Object, IntPtr*)

1)    at UITest.Appium.NUnit.UITestBase.UITestBaseTearDown() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 159
   at UITest.Appium.NUnit.UITestBase.TestTearDown() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 45
   at InvokeStub_UITestBase.TestTearDown(Object, Object, IntPtr*)


  Standard Error Messages:
 >>>>> 06/21/2026 19:33:15 The FixtureSetup threw an exception. Attempt 0/1.
 Exception details: System.TimeoutException: Shell Flyout SafeArea Rendering
    at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
    at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
    at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
    at Microsoft.Maui.TestCases.Tests._IssuesUITest.NavigateToIssue(String issue) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 54
    at Microsoft.Maui.TestCases.Tests._IssuesUITest.TryToResetTestState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 25
    at Microsoft.Maui.TestCases.Tests.UITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 576
 >>>>> 06/21/2026 19:33:34 The FixtureSetup threw an exception. Attempt 1/1.
 Exception details: System.TimeoutException: Shell Flyout SafeArea Rendering
    at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2757
    at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2784
    at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 793
    at Microsoft.Maui.TestCases.Tests._IssuesUITest.NavigateToIssue(String issue) in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 54
    at Microsoft.Maui.TestCases.Tests._IssuesUITest.TryToResetTestState() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_IssuesUITest.cs:line 25
    at Microsoft.Maui.TestCases.Tests.UITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 576

NUnit Adapter 4.5.0.0: Test execution complete
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.14]   Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.55]   Discovered:  Controls.TestCases.Android.Tests
Results File: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue32275.trx

Test Run Failed.
Total tests: 6
     Failed: 6
 Total time: 4.6936 Minutes
>>> TRX_RESULT_FILE: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue32275.trx

🟢 With fix — 🖥️ Issue32275: PASS ✅ · 854s
  Determining projects to restore...
  All projects are up-to-date for restore.
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0-android36.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0-android36.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0-android36.0/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net10.0-android36.0/Microsoft.Maui.Maps.dll
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-android36.0/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Xaml.dll
  Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-android36.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
  Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Maps.dll
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Foldable.dll
  Controls.TestCases.HostApp -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Controls.TestCases.HostApp.dll
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.dll
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Maps.dll
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.dll
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.AspNetCore.Components.WebView.Maui.dll
  Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Maps.dll
  Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Foldable.dll
  Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Xaml.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:10:48.14
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
  Determining projects to restore...
  All projects are up-to-date for restore.
  Controls.CustomAttributes -> /home/vsts/work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
  Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
  ##vso[build.updatebuildnumber]10.0.90-ci+azdo.14442939
  Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
  UITest.Core -> /home/vsts/work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
  VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
  UITest.Appium -> /home/vsts/work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
  UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
  VisualTestUtils.MagickNet -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
  UITest.Analyzers -> /home/vsts/work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
  Controls.TestCases.Android.Tests -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
   NUnit3TestExecutor discovered 6 of 6 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 06/21/2026 19:46:32 VerifyDefaultFlyoutItemsRendering Start
>>>>> 06/21/2026 19:46:32 FixtureSetup for VerifyDefaultFlyoutItemsRendering
>>>>> 06/21/2026 19:46:39 VerifyDefaultFlyoutItemsRendering Stop
  Passed VerifyDefaultFlyoutItemsRendering [9 s]
>>>>> 06/21/2026 19:46:42 VerifyFlyoutWithHeaderFooter Start
>>>>> 06/21/2026 19:46:42 FixtureSetup for VerifyFlyoutWithHeaderFooter
>>>>> 06/21/2026 19:46:53 VerifyFlyoutWithHeaderFooter Stop
  Passed VerifyFlyoutWithHeaderFooter [13 s]
>>>>> 06/21/2026 19:46:55 VerifyCustomFlyoutContentTemplateRendering Start
>>>>> 06/21/2026 19:46:55 FixtureSetup for VerifyCustomFlyoutContentTemplateRendering
>>>>> 06/21/2026 19:47:05 VerifyCustomFlyoutContentTemplateRendering Stop
  Passed VerifyCustomFlyoutContentTemplateRendering [11 s]
>>>>> 06/21/2026 19:47:06 VerifyCustomFlyoutContentTemplateWithHeaderFooter Start
>>>>> 06/21/2026 19:47:06 FixtureSetup for VerifyCustomFlyoutContentTemplateWithHeaderFooter
>>>>> 06/21/2026 19:47:19 VerifyCustomFlyoutContentTemplateWithHeaderFooter Stop
  Passed VerifyCustomFlyoutContentTemplateWithHeaderFooter [14 s]
>>>>> 06/21/2026 19:47:20 VerifyCustomFlyoutContentRendering Start
>>>>> 06/21/2026 19:47:20 FixtureSetup for VerifyCustomFlyoutContentRendering
>>>>> 06/21/2026 19:47:31 VerifyCustomFlyoutContentRendering Stop
  Passed VerifyCustomFlyoutContentRendering [12 s]
>>>>> 06/21/2026 19:47:33 VerifyCustomFlyoutContentWithHeaderFooter Start
>>>>> 06/21/2026 19:47:33 FixtureSetup for VerifyCustomFlyoutContentWithHeaderFooter
>>>>> 06/21/2026 19:47:46 VerifyCustomFlyoutContentWithHeaderFooter Stop
  Passed VerifyCustomFlyoutContentWithHeaderFooter [14 s]
NUnit Adapter 4.5.0.0: Test execution complete
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.14]   Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.67]   Discovered:  Controls.TestCases.Android.Tests
Results File: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue32275.trx

Test Run Successful.
Total tests: 6
     Passed: 6
 Total time: 1.4789 Minutes
>>> TRX_RESULT_FILE: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue32275.trx

📁 Fix files reverted (1 files)
  • src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs

🛫 Pre-Flight — Context & Validation

Issue: #32275 - Shell Flyout SafeArea Rendering
PR: #34510 - Android Shell flyout safe-area rendering fix
Platforms Affected: Android
Files Changed: 1 implementation, 3 test source files, 6 Android screenshot snapshots

Key Findings

  • PR implementation changes Android Shell flyout inset handling in ShellFlyoutTemplatedContentRenderer.cs from child-specific state to parent CoordinatorLayout safe-area padding and footer MatchParent width.
  • Gate result was supplied as already passed: Issue32275 fails without the fix and passes with the PR fix on Android.
  • gh is unauthenticated in this environment, so PR metadata/comments/CI could not be fetched live; local checked-out PR branch and existing gate/regression artifacts were used.
  • Independent code review found the production approach plausible but flagged test coverage/metadata issues.

Code Review Summary

Verdict: NEEDS_CHANGES
Confidence: low
Errors: 2 | Warnings: 0 | Suggestions: 0

Key code review findings:

  • ❌ src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs: tests do not switch to landscape, while the reported Android regression is landscape/display-cutout overlap.
  • ❌ src/Controls/tests/TestCases.HostApp/Issues/Issue32275.cs:3: issue page is marked PlatformAffected.iOS even though this PR/test path is Android-only.

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #34510 Parent CoordinatorLayout receives safe-area padding; footer width changes to MatchParent; Android screenshot coverage added for Issue32275. ✅ PASSED (Gate) ShellFlyoutTemplatedContentRenderer.cs, Issue32275 UI tests/snapshots Original PR fix; code review still flags test metadata/orientation gaps.

🔬 Code Review — Deep Analysis

Code Review — PR #34510

Independent Assessment

What this changes: Android Shell flyout now applies system-bar/display-cutout insets as padding on the flyout CoordinatorLayout, replacing per-child inset handling. It also adds Android screenshot UI coverage for flyout variants.
Inferred motivation: Prevent Shell flyout content/header/footer from rendering into unsafe areas, especially display cutouts.

Reconciliation with PR Narrative

Author claims: Fixes Android landscape Shell flyout safe-area/cutout overlap for #32275.
Agreement/disagreement: Production code matches the stated direction, but the added tests do not put the device in landscape and the new snapshots are portrait-sized (1080x1735), so they do not verify the stated regression.

Prior Review Reconciliation

Prior ❌ Error Finding Source Status Evidence
Tests open the flyout in default orientation, missing Android landscape/display-cutout coverage MauiBot inline review ❌ Unresolved Issue32275.cs calls App.ShowFlyout() directly at lines 24, 36, 50, 64, 78, 93; no orientation change. Snapshots are portrait 1080x1735.
HostApp issue page is marked PlatformAffected.iOS despite Android-only PR/tests MauiBot inline review ❌ Unresolved src/Controls/tests/TestCases.HostApp/Issues/Issue32275.cs:3 still uses PlatformAffected.iOS.
Gate reported fix does not pass tests at current head MauiBot review body ❌ Unresolved Prior review for commit 6c91a14 reports “Fix does not pass the tests”.

Blast Radius Assessment

  • Runs for all instances: Yes — all Android Shell flyout renderers using this listener.
  • Startup impact: Limited — Shell flyout renderer setup path, not global app startup.
  • Static/shared state: No new static/shared state.

CI Status

  • Required-check result: undetermined
  • Classification: undetermined
  • Action taken: gh pr checks 34510 --required failed because gh is unauthenticated; confidence capped low and no LGTM.

Findings

❌ Error — Regression tests do not exercise the landscape cutout scenario

The PR claims to fix an Android landscape/display-cutout regression, but every new test opens the flyout in the default orientation (src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:24, also 36, 50, 64, 78, 93). The added baselines are portrait-sized (1080x1735), so these screenshots can pass while the landscape left/right cutout collision still regresses.

❌ Error — Android issue page is labeled as iOS

src/Controls/tests/TestCases.HostApp/Issues/Issue32275.cs:3 declares PlatformAffected.iOS even though the PR, fix, and test class are Android-only. This metadata should be PlatformAffected.Android unless the scenario is intentionally cross-platform.

Failure-Mode Probing

  • Landscape display cutout: Not verified by tests; current snapshots are portrait.
  • Header/footer flyout: Production code applies parent padding and MatchParent footer width, which appears directionally sound, but test coverage gap remains.
  • Handler disconnect/reconnect: Listener is still removed in Disconnect; no new subscription accumulation found.

Verdict: NEEDS_CHANGES

Confidence: low
Summary: The production approach is plausible, but prior ❌ findings remain unresolved and CI status is unavailable. The added tests do not validate the actual landscape regression described by the PR.


🛠️ Fix — Analysis & Comparison

Fix Candidates

# Source Approach Test Result Files Changed Notes
1 try-fix-1 Child-specific inset distribution: keep the outer drawer mostly unpadded and apply safe-area padding to app bar, flyout content, footer, and background. ❌ FAIL 1 file Android Issue32275 ran; 5/6 passed, VerifyCustomFlyoutContentTemplateRendering failed screenshot comparison by 29.57%. Direct child padding changes custom template rendering geometry.
2 try-fix-2 Layout-margin safe-area box: keep parent geometry unchanged and apply safe-area offsets via child layout margins plus background padding. ✅ PASS 1 file Android Issue32275 ran; 6/6 passed. More complex than the PR fix; does not address test orientation/metadata gaps by itself.
PR PR #34510 Parent CoordinatorLayout safe-area padding plus footer MatchParent width. ✅ PASSED (Gate) 4 source/test files + snapshots Original PR fix passed gate; code review flagged test metadata/orientation coverage gaps.

Cross-Pollination

Model Round New Ideas? Details
code-review + maui-expert-reviewer 1 Yes Suggested child-specific distribution, drawer-width/margin based fix, inner safe-area host, ShellFlyoutLayout inset handling, footer-focused surgical fix, shared safe-area delegation, and partial inset consumption.
try-fix loop 2 Yes Failure of try-fix-1 showed direct child padding alters custom template screenshot geometry; try-fix-2 switched to layout margins.
try-fix loop 3 No Remaining untested ideas were either higher-risk structural rewrites (inner host, ShellFlyoutLayout ownership, shared safe-area plumbing) or trivial variations of the passing PR/try-fix-2 strategies.

Exhausted: Yes
Selected Fix: Candidate #2 for alternative consideration — it passes the Android Issue32275 suite with a different layout-margin strategy. PR #34510 remains simpler and already gate-passing, but both require separate test cleanup for Android metadata and true landscape/display-cutout coverage.


📝 Recommended PR Title & Description

Assessment: ✏️ Recommend updating — the current description has one stale/incorrect type name (WindowsListener) and does not mention the added Android Issue32275 screenshot coverage.

Recommended title

[Android] Shell Flyout: Apply safe-area insets to the flyout container

Recommended description

### Issue Details
On Android, Shell flyout content was not consistently offset for SystemBars/DisplayCutout insets in landscape mode. That left flyout items exposed to the notch and status bar area.

### Description of Change

This change simplifies `ShellFlyoutTemplatedContentRenderer.ShellFlyoutWindowInsetListener` so the flyout `CoordinatorLayout` consumes the window insets and applies the max of SystemBars and DisplayCutout insets as padding on the container itself.

That replaces the older per-subview logic that separately adjusted the app bar, flyout content, footer, and background image. The footer layout width now uses `MatchParent` so it is bounded by the flyout container's padded content area.

The PR also adds Android Issue32275 screenshot coverage for default flyout items, custom flyout content/content templates, and header/footer combinations.

### Issues Fixed

Fixes #32275

| Before  | After  |
|---------|--------|
| **Android**<br> <video src="https://github.com/user-attachments/assets/07e160a0-da8a-4254-b469-f8604784a205" width="260" height="500"> |**Android**<br> <video src="https://github.com/user-attachments/assets/4e6a7572-e6b0-4d1a-a9b3-18797278e7f1" width="260" height="500"> |

🏁 Report — Final Recommendation

Comparative Candidate Report - PR #34510

Candidates compared

Rank Candidate Regression result Assessment
1 pr PASS Best choice. It is the simplest passing production fix: parent CoordinatorLayout padding defines one safe content box, and footer MatchParent width respects that padded box.
2 pr-plus-reviewer PASS Equivalent to pr because the MAUI expert reviewer returned no actionable findings to apply. It is not ranked above pr because it contains no improvement over the raw PR fix.
3 try-fix-2 PASS Viable alternative using child layout margins plus background padding, but it reintroduces listener-held child references and more moving parts than the PR's parent-padding approach.
4 try-fix-1 FAIL Must rank lower because Android Issue32275 failed: VerifyCustomFlyoutContentTemplateRendering had a 29.57% screenshot mismatch. Direct child padding changed custom template geometry.

Analysis

try-fix-1 is eliminated by the ranking rule because it failed regression testing. try-fix-2 passed and demonstrates that a layout-margin strategy can avoid the rendering failure, but it is more complex than the PR and restores weak references to child views that the PR no longer needs.

The PR's approach is preferable because the safe area is expressed once on the flyout container instead of distributed across app bar, content, footer, and background surfaces. That reduces lifecycle coupling and avoids the custom-template geometry regression observed in try-fix-1.

The expert-review pass returned no actionable inline findings, so pr-plus-reviewer is identical to pr. Earlier pre-flight review concerns about Android issue metadata and explicit landscape coverage remain useful follow-up test-quality feedback, but they do not make an alternative implementation candidate stronger than the passing, simpler PR fix.

Winner

Winner: pr

The raw PR fix wins because it passed the supplied gate, is simpler than the passing alternative, avoids the failed child-padding strategy, and received no additional actionable expert-review changes.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Jun 22, 2026
@kubaflo
kubaflo changed the base branch from main to inflight/current June 22, 2026 13:21
@kubaflo
kubaflo merged commit f739149 into dotnet:inflight/current Jun 22, 2026
33 checks passed
@github-actions github-actions Bot added this to the .NET 10 SR9 milestone Jun 22, 2026
PureWeen pushed a commit that referenced this pull request Jun 22, 2026
#34510)

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Issue Details
On Android, Shell flyout content was not consistently offset for
SystemBars/DisplayCutout insets in landscape mode. That left flyout
items exposed to the notch and status bar area.


### Description of Change

<!-- Enter description of the fix in this section -->
This change simplifies
ShellFlyoutTemplatedContentRenderer.WindowsListener so the flyout
CoordinatorLayout consumes the window insets and applies the max of
SystemBars and DisplayCutout insets as padding on the container itself.

That replaces the older per-subview logic that separately adjusted the
app bar, flyout content, footer, and background image.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #32275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

| Before  | After  |
|---------|--------|
| **Android**<br> <video
src="https://github.com/user-attachments/assets/07e160a0-da8a-4254-b469-f8604784a205"
width="260" height="500"> |**Android**<br> <video
src="https://github.com/user-attachments/assets/4e6a7572-e6b0-4d1a-a9b3-18797278e7f1"
width="260" height="500"> |
kubaflo pushed a commit that referenced this pull request Jun 25, 2026
#34510)

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Issue Details
On Android, Shell flyout content was not consistently offset for
SystemBars/DisplayCutout insets in landscape mode. That left flyout
items exposed to the notch and status bar area.


### Description of Change

<!-- Enter description of the fix in this section -->
This change simplifies
ShellFlyoutTemplatedContentRenderer.WindowsListener so the flyout
CoordinatorLayout consumes the window insets and applies the max of
SystemBars and DisplayCutout insets as padding on the container itself.

That replaces the older per-subview logic that separately adjusted the
app bar, flyout content, footer, and background image.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #32275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

| Before  | After  |
|---------|--------|
| **Android**<br> <video
src="https://github.com/user-attachments/assets/07e160a0-da8a-4254-b469-f8604784a205"
width="260" height="500"> |**Android**<br> <video
src="https://github.com/user-attachments/assets/4e6a7572-e6b0-4d1a-a9b3-18797278e7f1"
width="260" height="500"> |
kubaflo pushed a commit that referenced this pull request Jul 3, 2026
#34510)

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Issue Details
On Android, Shell flyout content was not consistently offset for
SystemBars/DisplayCutout insets in landscape mode. That left flyout
items exposed to the notch and status bar area.


### Description of Change

<!-- Enter description of the fix in this section -->
This change simplifies
ShellFlyoutTemplatedContentRenderer.WindowsListener so the flyout
CoordinatorLayout consumes the window insets and applies the max of
SystemBars and DisplayCutout insets as padding on the container itself.

That replaces the older per-subview logic that separately adjusted the
app bar, flyout content, footer, and background image.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #32275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

| Before  | After  |
|---------|--------|
| **Android**<br> <video
src="https://github.com/user-attachments/assets/07e160a0-da8a-4254-b469-f8604784a205"
width="260" height="500"> |**Android**<br> <video
src="https://github.com/user-attachments/assets/4e6a7572-e6b0-4d1a-a9b3-18797278e7f1"
width="260" height="500"> |
@kubaflo kubaflo mentioned this pull request Jul 6, 2026
kubaflo pushed a commit that referenced this pull request Jul 6, 2026
#34510)

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Issue Details
On Android, Shell flyout content was not consistently offset for
SystemBars/DisplayCutout insets in landscape mode. That left flyout
items exposed to the notch and status bar area.


### Description of Change

<!-- Enter description of the fix in this section -->
This change simplifies
ShellFlyoutTemplatedContentRenderer.WindowsListener so the flyout
CoordinatorLayout consumes the window insets and applies the max of
SystemBars and DisplayCutout insets as padding on the container itself.

That replaces the older per-subview logic that separately adjusted the
app bar, flyout content, footer, and background image.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #32275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

| Before  | After  |
|---------|--------|
| **Android**<br> <video
src="https://github.com/user-attachments/assets/07e160a0-da8a-4254-b469-f8604784a205"
width="260" height="500"> |**Android**<br> <video
src="https://github.com/user-attachments/assets/4e6a7572-e6b0-4d1a-a9b3-18797278e7f1"
width="260" height="500"> |
PureWeen pushed a commit that referenced this pull request Jul 7, 2026
#34510)

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Issue Details
On Android, Shell flyout content was not consistently offset for
SystemBars/DisplayCutout insets in landscape mode. That left flyout
items exposed to the notch and status bar area.


### Description of Change

<!-- Enter description of the fix in this section -->
This change simplifies
ShellFlyoutTemplatedContentRenderer.WindowsListener so the flyout
CoordinatorLayout consumes the window insets and applies the max of
SystemBars and DisplayCutout insets as padding on the container itself.

That replaces the older per-subview logic that separately adjusted the
app bar, flyout content, footer, and background image.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #32275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

| Before  | After  |
|---------|--------|
| **Android**<br> <video
src="https://github.com/user-attachments/assets/07e160a0-da8a-4254-b469-f8604784a205"
width="260" height="500"> |**Android**<br> <video
src="https://github.com/user-attachments/assets/4e6a7572-e6b0-4d1a-a9b3-18797278e7f1"
width="260" height="500"> |
PureWeen pushed a commit that referenced this pull request Jul 7, 2026
#34510)

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Issue Details
On Android, Shell flyout content was not consistently offset for
SystemBars/DisplayCutout insets in landscape mode. That left flyout
items exposed to the notch and status bar area.


### Description of Change

<!-- Enter description of the fix in this section -->
This change simplifies
ShellFlyoutTemplatedContentRenderer.WindowsListener so the flyout
CoordinatorLayout consumes the window insets and applies the max of
SystemBars and DisplayCutout insets as padding on the container itself.

That replaces the older per-subview logic that separately adjusted the
app bar, flyout content, footer, and background image.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #32275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

| Before  | After  |
|---------|--------|
| **Android**<br> <video
src="https://github.com/user-attachments/assets/07e160a0-da8a-4254-b469-f8604784a205"
width="260" height="500"> |**Android**<br> <video
src="https://github.com/user-attachments/assets/4e6a7572-e6b0-4d1a-a9b3-18797278e7f1"
width="260" height="500"> |
kubaflo pushed a commit that referenced this pull request Jul 10, 2026
#34510)

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Issue Details
On Android, Shell flyout content was not consistently offset for
SystemBars/DisplayCutout insets in landscape mode. That left flyout
items exposed to the notch and status bar area.


### Description of Change

<!-- Enter description of the fix in this section -->
This change simplifies
ShellFlyoutTemplatedContentRenderer.WindowsListener so the flyout
CoordinatorLayout consumes the window insets and applies the max of
SystemBars and DisplayCutout insets as padding on the container itself.

That replaces the older per-subview logic that separately adjusted the
app bar, flyout content, footer, and background image.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #32275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

| Before  | After  |
|---------|--------|
| **Android**<br> <video
src="https://github.com/user-attachments/assets/07e160a0-da8a-4254-b469-f8604784a205"
width="260" height="500"> |**Android**<br> <video
src="https://github.com/user-attachments/assets/4e6a7572-e6b0-4d1a-a9b3-18797278e7f1"
width="260" height="500"> |
kubaflo pushed a commit that referenced this pull request Jul 15, 2026
#34510)

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Issue Details
On Android, Shell flyout content was not consistently offset for
SystemBars/DisplayCutout insets in landscape mode. That left flyout
items exposed to the notch and status bar area.


### Description of Change

<!-- Enter description of the fix in this section -->
This change simplifies
ShellFlyoutTemplatedContentRenderer.WindowsListener so the flyout
CoordinatorLayout consumes the window insets and applies the max of
SystemBars and DisplayCutout insets as padding on the container itself.

That replaces the older per-subview logic that separately adjusted the
app bar, flyout content, footer, and background image.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #32275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

| Before  | After  |
|---------|--------|
| **Android**<br> <video
src="https://github.com/user-attachments/assets/07e160a0-da8a-4254-b469-f8604784a205"
width="260" height="500"> |**Android**<br> <video
src="https://github.com/user-attachments/assets/4e6a7572-e6b0-4d1a-a9b3-18797278e7f1"
width="260" height="500"> |
kubaflo pushed a commit that referenced this pull request Jul 21, 2026
…didate PR #36411 (#36672)

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Issue Details
Android Shell Flyout UI Test Failures in Candidate PR
#[36411](#36411) due to PR
#[34510](#34510)

### Description of Change

<!-- Enter description of the fix in this section -->
On Android, the Shell flyout was incorrectly applying bottom padding
even when the flyout didn't reach the bottom safe area. The fix checks
if the view actually overlaps the bottom safe area before applying the
bottom inset padding.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #36625 

### Test failure details
* VerifyShellFlyout_HeightAndWidthWithBackgroundColor
* VerifyShellFlyout_HeightAndWidthWithBackgroundImage 
* VerifyShellFlyout_BackgroundImageWithHeaderAndFooter 
* VerifyShellFlyout_Height, ShouldFlyoutTextWrapsInLandscape
kubaflo pushed a commit that referenced this pull request Jul 22, 2026
#34510)

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->
### Issue Details
On Android, Shell flyout content was not consistently offset for
SystemBars/DisplayCutout insets in landscape mode. That left flyout
items exposed to the notch and status bar area.


### Description of Change

<!-- Enter description of the fix in this section -->
This change simplifies
ShellFlyoutTemplatedContentRenderer.WindowsListener so the flyout
CoordinatorLayout consumes the window insets and applies the max of
SystemBars and DisplayCutout insets as padding on the container itself.

That replaces the older per-subview logic that separately adjusted the
app bar, flyout content, footer, and background image.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #32275 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

| Before  | After  |
|---------|--------|
| **Android**<br> <video
src="https://github.com/user-attachments/assets/07e160a0-da8a-4254-b469-f8604784a205"
width="260" height="500"> |**Android**<br> <video
src="https://github.com/user-attachments/assets/4e6a7572-e6b0-4d1a-a9b3-18797278e7f1"
width="260" height="500"> |
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 23, 2026
@github-actions github-actions Bot modified the milestones: .NET 10 SR9, .NET 10 SR10 Aug 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-safearea Issues/PRs that have to do with the SafeArea functionality community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android s/agent-fix-implemented PR author implemented the agent suggested fix s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-gate-passed AI verified tests catch the bug (fail without fix, pass with fix) s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) s/agent-suggestions-implemented Maintainer applies when PR author adopts agent's recommendation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NET10] SafeAreaEdges cannot be set for Shell and the flyout menu collides with display notch and status bar in landscape mode

5 participants