[Android] Enable native edge-to-edge and fix dynamic system bar icon colors - #36226
[Android] Enable native edge-to-edge and fix dynamic system bar icon colors#36226praveenkumarkarunanithi wants to merge 4 commits into
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 36226Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 36226" |
|
Is this PR related? #36214 |
|
Yes, related. PR #36214 refines how the status-bar icon color is determined inside For context, my PR migrates the Android backend to native edge-to-edge by replacing The two changes are complementary and do not conflict. My PR does not modify |
This comment has been minimized.
This comment has been minimized.
MauiBot
left a comment
There was a problem hiding this comment.
Expert Review — 2 findings
See inline comments for details.
|
|
||
| base.OnCreate(savedInstanceState); | ||
| WindowCompat.SetDecorFitsSystemWindows(Window, false); | ||
| WindowCompat.EnableEdgeToEdge(Window); |
There was a problem hiding this comment.
🔍 AI-Generated Review (multi-model)
[critical] Public API Surface / Backward Compatibility — This now enables edge-to-edge globally while the same PR deletes the documented maui_edgetoedge_optout Android attr. Apps/libraries that still follow the published opt-out guidance and keep <item name="maui_edgetoedge_optout">true</item> in their own theme resources will fail at Android resource linking after upgrading because the referenced MAUI attr no longer exists. If edge-to-edge must be mandatory, please keep the attr declared as an unused compatibility resource (or add a replacement/deprecation path) so existing style overrides continue to build, and document the behavior change separately.
| }, | ||
| }; | ||
|
|
||
| Application.Current!.RequestedThemeChanged += OnRequestedThemeChanged; |
There was a problem hiding this comment.
🔍 AI-Generated Review (multi-model)
[minor] Memory Leak Prevention — Application.Current!.RequestedThemeChanged += OnRequestedThemeChanged; subscribes this test page to an application-lifetime event but never unsubscribes. Reopening the issue page roots each Issue32987BarStatePage instance and its content tree for the rest of the test host process. Low impact for this gallery test page, but please unsubscribe in OnDisappearing/cleanup to keep the test page lifecycle symmetric.
Tests Failure Analysis
Test Failure Review: Not ready - click to expandOverall verdict: Not ready: against several recent
Coverage: 138 checks · 98 passing · 40 failing · 0 pending · 1 unmapped · 69 unexplained build legs · 3 aborted · 4 device-test unverified · 1250 unattributed · 378 regressed-vs-base. Deterministic ceiling: Not ready — 378 legs regressed vs base. Builds (this PR): maui-pr 1503121 · maui-pr-uitests 1495101 · maui-pr-devicetests 1495102. Base sampling ( Scope: platform/android. Base branch: net11.0. Recommended actionConfirm the 378 regressed-vs-base failure(s) flagged above are resolved before merging; the remaining failures reproduce on the base branch and are not caused by this PR. |
This comment has been minimized.
This comment has been minimized.
MauiBot
left a comment
There was a problem hiding this comment.
Expert Review — 1 findings
See inline comments for details.
|
|
||
| base.OnCreate(savedInstanceState); | ||
| WindowCompat.SetDecorFitsSystemWindows(Window, false); | ||
| WindowCompat.EnableEdgeToEdge(Window); |
There was a problem hiding this comment.
🔍 AI-Generated Review (multi-model)
[major] Backward Compatibility and Migration — Deleting the maui_edgetoedge_optout attr definition is a breaking change for external consumers. This attr was shipped in .NET 9/10 MAUI themes (Maui.MainTheme.Base, Maui.Material3.Theme.Base), and any app or library whose custom Android theme references <item name="maui_edgetoedge_optout">…</item> will fail at AAPT2 resource linking when upgrading to .NET 11. Consider keeping the <attr> definition (even if MAUI no longer reads it) so external theme references compile, and deprecate it via an XML comment instead of removing outright. The style <item> entries in styles.xml / styles-material3.xml can still be removed since the value is no longer consumed.
MauiBot
left a comment
There was a problem hiding this comment.
AI Review Summary
@praveenkumarkarunanithi — new AI review results are available based on this last commit:
b1a2cf3. To request a fresh review after new comments or commits, comment/review rerun.
🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix
Gate Result: ✅ PASSED
Platform: ANDROID · Base: net11.0 · Merge base: 7f139ed4
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
🖥️ Issue32987 Issue32987 |
✅ FAIL — 2220s | ✅ PASS — 415s |
🔴 Without fix — 🖥️ Issue32987: FAIL ✅ · 2220s
(truncated to last 15,000 chars)
Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net11.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/37.0.0-ci.main.51/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass102_0.<InstallPackage>b__0(Task`1 t) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net11.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/37.0.0-ci.main.51/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net11.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/37.0.0-ci.main.51/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: --- End of stack trace from previous location --- [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net11.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/37.0.0-ci.main.51/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net11.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/37.0.0-ci.main.51/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net11.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/37.0.0-ci.main.51/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: --- End of stack trace from previous location --- [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net11.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/37.0.0-ci.main.51/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net11.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/37.0.0-ci.main.51/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net11.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/37.0.0-ci.main.51/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net11.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/37.0.0-ci.main.51/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net11.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/37.0.0-ci.main.51/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.RunInstall() [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net11.0-android]
0 Warning(s)
1 Error(s)
Time Elapsed 00:18:12.54
* daemon not running; starting now at tcp:5037
* daemon started successfully
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net11.0-android37.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net11.0-android37.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net11.0-android37.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
Core.HybridWebViewSourceGen -> /home/vsts/work/1/s/artifacts/bin/Core.HybridWebViewSourceGen/Debug/netstandard2.0/Microsoft.Maui.Core.HybridWebViewSourceGen.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net11.0-android37.0/Microsoft.Maui.Maps.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net11.0-android37.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net11.0-android37.0/Microsoft.Maui.Controls.Xaml.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net11.0-android37.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net11.0-android37.0/Microsoft.Maui.Controls.Foldable.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net11.0-android37.0/Microsoft.Maui.Controls.Maps.dll
Controls.TestCases.HostApp -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Controls.TestCases.HostApp.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
Core.HybridWebViewSourceGen -> /home/vsts/work/1/s/artifacts/bin/Core.HybridWebViewSourceGen/Debug/netstandard2.0/Microsoft.Maui.Core.HybridWebViewSourceGen.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Microsoft.Maui.Maps.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Microsoft.Maui.Controls.Foldable.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Microsoft.Maui.Controls.Xaml.dll
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Microsoft.Maui.Controls.Maps.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:07:29.87
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Starting: Intent { act=android.settings.SETTINGS }
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Determining projects to restore...
Restored /home/vsts/work/1/s/src/TestUtils/src/VisualTestUtils/VisualTestUtils.csproj (in 1.97 sec).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.NUnit/UITest.NUnit.csproj (in 830 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Core/UITest.Core.csproj (in 4 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/VisualTestUtils.MagickNet/VisualTestUtils.MagickNet.csproj (in 9 sec).
Restored /home/vsts/work/1/s/src/Controls/tests/CustomAttributes/Controls.CustomAttributes.csproj (in 6 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Appium/UITest.Appium.csproj (in 9 ms).
Restored /home/vsts/work/1/s/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj (in 6.15 sec).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Analyzers/UITest.Analyzers.csproj (in 1.89 sec).
6 of 14 projects are up-to-date for restore.
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net11.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net11.0/Microsoft.Maui.Essentials.dll
Controls.CustomAttributes -> /home/vsts/work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net11.0/Controls.CustomAttributes.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net11.0/Microsoft.Maui.dll
Core.HybridWebViewSourceGen -> /home/vsts/work/1/s/artifacts/bin/Core.HybridWebViewSourceGen/Debug/netstandard2.0/Microsoft.Maui.Core.HybridWebViewSourceGen.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net11.0/Microsoft.Maui.Controls.dll
UITest.Core -> /home/vsts/work/1/s/artifacts/bin/UITest.Core/Debug/net11.0/UITest.Core.dll
VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
VisualTestUtils.MagickNet -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
UITest.Appium -> /home/vsts/work/1/s/artifacts/bin/UITest.Appium/Debug/net11.0/UITest.Appium.dll
UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net11.0/UITest.NUnit.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/net11.0/Controls.TestCases.Android.Tests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll (.NETCoreApp,Version=v11.0)
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/net11.0/Controls.TestCases.Android.Tests.dll
NUnit3TestExecutor discovered 2 of 2 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 07/14/2026 21:43:39 FixtureSetup for Issue32987(Android)
>>>>> 07/14/2026 21:43:42 StatusBarIconsFollowThemeChange Start
>>>>> 07/14/2026 21:43:48 StatusBarIconsFollowThemeChange Stop
>>>>> 07/14/2026 21:43:49 Log types: logcat, bugreport, server
Failed StatusBarIconsFollowThemeChange [8 s]
Error Message:
Dark theme should use light status bar icons.
Assert.That(App.WaitForElement("LightIconsValue").GetText(), Is.EqualTo("False"))
Expected string length 5 but was 4. Strings differ at index 0.
Expected: "False"
But was: "True"
-----------^
Stack Trace:
at Microsoft.Maui.TestCases.Tests.Issues.Issue32987.StatusBarIconsFollowThemeChange() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32987.cs:line 46
1) at Microsoft.Maui.TestCases.Tests.Issues.Issue32987.StatusBarIconsFollowThemeChange() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32987.cs:line 46
>>>>> 07/14/2026 21:43:51 SystemBarsAreTransparentAndNavScrimRemoved Start
>>>>> 07/14/2026 21:43:51 SystemBarsAreTransparentAndNavScrimRemoved Stop
>>>>> 07/14/2026 21:43:52 Log types: logcat, bugreport, server
Failed SystemBarsAreTransparentAndNavScrimRemoved [2 s]
Error Message:
Status and navigation bars should be transparent under edge-to-edge.
Assert.That(App.WaitForElement("BarTransparentValue").GetText(), Is.EqualTo("True"))
Expected string length 4 but was 5. Strings differ at index 0.
Expected: "True"
But was: "False"
-----------^
Stack Trace:
at Microsoft.Maui.TestCases.Tests.Issues.Issue32987.SystemBarsAreTransparentAndNavScrimRemoved() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32987.cs:line 23
1) at Microsoft.Maui.TestCases.Tests.Issues.Issue32987.SystemBarsAreTransparentAndNavScrimRemoved() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32987.cs:line 23
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 11.0.0-preview.6.26325.125)
[xUnit.net 00:00:00.17] Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.75] Discovered: Controls.TestCases.Android.Tests
Results File: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue32987.trx
Test Run Failed.
Total tests: 2
Failed: 2
Total time: 38.0541 Seconds
>>> TRX_RESULT_FILE: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue32987.trx
🟢 With fix — 🖥️ Issue32987: PASS ✅ · 415s
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net11.0-android37.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net11.0-android37.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net11.0-android37.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
Core.HybridWebViewSourceGen -> /home/vsts/work/1/s/artifacts/bin/Core.HybridWebViewSourceGen/Debug/netstandard2.0/Microsoft.Maui.Core.HybridWebViewSourceGen.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net11.0-android37.0/Microsoft.Maui.Maps.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net11.0-android37.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net11.0-android37.0/Microsoft.Maui.Controls.Xaml.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net11.0-android37.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net11.0-android37.0/Microsoft.Maui.Controls.Foldable.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net11.0-android37.0/Microsoft.Maui.Controls.Maps.dll
Controls.TestCases.HostApp -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Controls.TestCases.HostApp.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
Core.HybridWebViewSourceGen -> /home/vsts/work/1/s/artifacts/bin/Core.HybridWebViewSourceGen/Debug/netstandard2.0/Microsoft.Maui.Core.HybridWebViewSourceGen.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Microsoft.Maui.Maps.dll
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Microsoft.Maui.Controls.Xaml.dll
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Microsoft.Maui.Controls.Maps.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net11.0-android/Microsoft.Maui.Controls.Foldable.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:05:18.36
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Starting: Intent { act=android.settings.SETTINGS }
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/net11.0/Controls.CustomAttributes.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net11.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net11.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net11.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
Core.HybridWebViewSourceGen -> /home/vsts/work/1/s/artifacts/bin/Core.HybridWebViewSourceGen/Debug/netstandard2.0/Microsoft.Maui.Core.HybridWebViewSourceGen.dll
##vso[build.updatebuildnumber]11.0.0-ci+azdo.14656744
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net11.0/Microsoft.Maui.Controls.dll
UITest.Core -> /home/vsts/work/1/s/artifacts/bin/UITest.Core/Debug/net11.0/UITest.Core.dll
VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
VisualTestUtils.MagickNet -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
UITest.Appium -> /home/vsts/work/1/s/artifacts/bin/UITest.Appium/Debug/net11.0/UITest.Appium.dll
UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net11.0/UITest.NUnit.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/net11.0/Controls.TestCases.Android.Tests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net11.0/Controls.TestCases.Android.Tests.dll (.NETCoreApp,Version=v11.0)
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/net11.0/Controls.TestCases.Android.Tests.dll
NUnit3TestExecutor discovered 2 of 2 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 07/14/2026 21:58:22 FixtureSetup for Issue32987(Android)
>>>>> 07/14/2026 21:58:25 StatusBarIconsFollowThemeChange Start
>>>>> 07/14/2026 21:58:30 StatusBarIconsFollowThemeChange Stop
Passed StatusBarIconsFollowThemeChange [5 s]
>>>>> 07/14/2026 21:58:31 SystemBarsAreTransparentAndNavScrimRemoved Start
>>>>> 07/14/2026 21:58:31 SystemBarsAreTransparentAndNavScrimRemoved Stop
Passed SystemBarsAreTransparentAndNavScrimRemoved [1 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 11.0.0-preview.6.26325.125)
[xUnit.net 00:00:00.15] Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.59] Discovered: Controls.TestCases.Android.Tests
Results File: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue32987.trx
Test Run Successful.
Total tests: 2
Passed: 2
Total time: 23.3747 Seconds
>>> TRX_RESULT_FILE: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue32987.trx
📁 Fix files reverted (8 files)
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Android.cssrc/Core/src/Handlers/Window/WindowHandler.Android.cssrc/Core/src/Platform/Android/MauiAppCompatActivity.Lifecycle.cssrc/Core/src/Platform/Android/MauiAppCompatActivity.cssrc/Core/src/Platform/Android/MauiWebChromeClient.cssrc/Core/src/Platform/Android/Resources/values/attr.xmlsrc/Core/src/Platform/Android/Resources/values/styles-material3.xmlsrc/Core/src/Platform/Android/Resources/values/styles.xml
📱 UI Tests — SafeAreaEdges,ViewBaseTests
Detected UI test categories: SafeAreaEdges,ViewBaseTests
❌ Deep UI tests — 58 passed, 4 failed; plus 1 category (119 tests) could not run (fixture/OneTimeSetUp setup failure — infrastructure) across 2 categories on platform-pool agent (replaces in-process counts above).
🧪 UI Test Execution Results (deep, platform pool)
| Category | Tests | Snapshot diffs |
|---|---|---|
SafeAreaEdges |
58/62 (4 ❌) | 8 diff PNGs |
ViewBaseTests |
0/119 (setup failed; 119 marked failed) | — |
⚠️ ViewBaseTests — fixture setup failed for 119 tests
NUnit reported a OneTimeSetUp/fixture setup failure before test bodies ran; the TRX marked each affected test failed.
Multiple setup failure signatures were present; showing the first one. See the TRX artifact for all details.
OneTimeSetUp: System.TimeoutException : Timed out waiting for Go To Test button to appear
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 2761
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 2788
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 797
at Microsoft.Maui.TestCases.Tests.UtilExtensions.NavigateToGallery(IApp app, String page) in /_/src/Controls/tests/TestCases.Shared.Tests/UtilExtensions.cs:line 37
at Microsoft.Maui.TestCases.Tests._GalleryUITest.FixtureSetup() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/_GalleryUITest.cs:line 57
at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 221
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
❌ SafeAreaEdges — 4 failed tests
ToolbarExtendsAllTheWayLeftAndRight_FlyoutPage
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: ToolbarExtendsAllTheWayLeftAndRight_FlyoutPage.png (1.10% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullab
...
ToolbarExtendsAllTheWayLeftAndRight_Shell
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: ToolbarExtendsAllTheWayLeftAndRight_Shell.png (1.10% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1
...
LayoutShouldBeCorrectOnFirstNavigation
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: LayoutShouldBeCorrectOnFirstNavigation.png (1.41% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 ret
...
ToolbarExtendsAllTheWayLeftAndRight_NavigationPage
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: ToolbarExtendsAllTheWayLeftAndRight_NavigationPage.png (1.10% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 123
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nu
...
🔍 AI analysis of failures — PR-related vs unrelated
🔍 AI-generated triage (GitHub Copilot CLI) — a heuristic judgement of whether each deep UI test failure is connected to this PR's changes. Verify before relying on it.
Likely PR-related: one or more failures appear connected to this PR's changes.
- ✗ PR-related — Android SafeAreaEdges visual snapshots (~4 tests): all failures are Android screenshot baseline mismatches in toolbar/navigation safe-area coverage, and this PR directly changes Android edge-to-edge/window/system-bar behavior that plausibly affects the rendered pixels, including representative test
ToolbarExtendsAllTheWayLeftAndRight_Shell.
Strongest signal: the run platform is Android and the PR changes Android window edge-to-edge configuration, so these look like expected PR-caused visual deltas or regressions rather than unrelated flake.
📎 Download drop-deep-uitests artifact (TRX + snapshot diffs)
📋 Pre-Flight — Context & Validation
Issue: #32987 - StatusBar and FlyoutBackground wrong color on Android
PR: #36226 - [Android] Enable native edge-to-edge and fix dynamic system bar icon colors
Platforms Affected: Android
Files Changed: 8 implementation, 2 test
Key Findings
- Issue #32987 is an Android regression where edge-to-edge/system bar handling makes status bar foreground unreadable and modal/system bar behavior inconsistent, especially with theme changes.
- PR fix migrates to
WindowCompat.EnableEdgeToEdge, removes the oldmaui_edgetoedge_optoutresource path, reapplies system-bar icon colors on activity/modal configuration changes, and adds Android UI coverage forIssue32987. - Gate was already completed separately:
Issue32987failed without the fix and passed with the PR fix on Android. Gate files were not modified. - Prior review comments raised a critical compatibility concern: removing
maui_edgetoedge_optoutcan break existing app themes that still reference the attr. - PR comments identify related PR #36214, which changes how status-bar icon color is computed; PR #36226 changes when/applying edge-to-edge and icon colors.
Code Review Summary
Verdict: NEEDS_CHANGES
Confidence: low
Errors: 2 | Warnings: 1 | Suggestions: 0
Key code review findings:
- ✗
src/Core/src/Platform/Android/Resources/values/attr.xml: deletingmaui_edgetoedge_optoutis a resource compatibility break for existing app/library themes. - ✗ Prior public test-failure analysis reported broad Android visual regressions attributed to the PR's global edge-to-edge rendering change.
- ⚠
src/Controls/tests/TestCases.HostApp/Issues/Issue32987.cs: issue test page subscribes toRequestedThemeChangedand changesUserAppThemewithout lifecycle cleanup/restoration.
Failure-mode probes:
- Existing app references old opt-out attr: Android resource linking can fail if the attr is deleted.
- Theme changes without activity recreation: PR reapplies icon appearance in
OnConfigurationChanged. - Modal dialog windows: PR configures each dialog's separate
Window, including reapply on modal configuration changes. - WebView fullscreen exit: PR keeps edge-to-edge enabled instead of restoring decor fitting.
Blast radius: Android startup/window infrastructure; runs for all Android MAUI apps and has startup impact.
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #36226 | Use AndroidX WindowCompat.EnableEdgeToEdge globally, remove old opt-out resources, reapply icon appearance for activity/modal windows, keep WebView fullscreen edge-to-edge. |
✅ PASSED (Gate) | 8 implementation, 2 test | Original PR; compatibility/visual-regression concerns remain. |
🔬 Code Review — Deep Analysis
Code Review — PR #36226
Independent Assessment
What this changes: Android startup now enables AndroidX WindowCompat.EnableEdgeToEdge globally, removes MAUI’s maui_edgetoedge_optout resource defaults, reapplies system-bar icon appearance on window connect/config changes, applies edge-to-edge to modal dialog windows, and stops WebView fullscreen from toggling decor fitting. Adds Android UI tests that expose window bar state through labels.
Inferred motivation: Make Android edge-to-edge behavior native/default and keep system-bar icon colors correct across theme changes and modal windows.
Reconciliation with PR Narrative
Author claims: The PR migrates to native AndroidX edge-to-edge for .NET 11, removes the old opt-out theme path, fixes transparent bars/nav scrim/icon colors, and adds validation.
Agreement/disagreement: The code matches the claimed migration. However, deleting the attr is a compatibility risk, and prior/public CI evidence shows broad Android visual baseline regressions remain unresolved.
Prior Review Reconciliation
| Prior ❌ Error Finding | Source | Status | Evidence |
|---|---|---|---|
Removing maui_edgetoedge_optout can break existing app/library themes that still reference the attr. |
MauiBot [critical] inline review on MauiAppCompatActivity.cs:31 |
❌ Unresolved | Current PR still deletes the attr from src/Core/src/Platform/Android/Resources/values/attr.xml and uses mandatory EnableEdgeToEdge at MauiAppCompatActivity.cs:31. |
| Android visual tests regressed vs base due to edge-to-edge/system-bar rendering changes. | Prior /review tests issue comments |
❌ Unresolved | Prior analysis attributes visual regressions to this PR; authenticated CI details were unavailable in this session. |
Blast Radius Assessment
- Runs for all instances: yes —
MauiAppCompatActivity.OnCreateaffects every Android MAUI app window. - Startup impact: yes — window configuration now changes during activity creation.
- Static/shared state: no new static state in production code.
CI Status
- Required-check result: unavailable via
gh pr checks --requiredbecauseghis unauthenticated. - Classification: undetermined in-session; prior public review/test-analysis comments reported PR-attributed failures.
- Action taken: confidence capped low.
Findings
❌ Error — Keep maui_edgetoedge_optout declared for compatibility
The PR removes maui_edgetoedge_optout from src/Core/src/Platform/Android/Resources/values/attr.xml while making EnableEdgeToEdge mandatory at src/Core/src/Platform/Android/MauiAppCompatActivity.cs:31. Existing app themes that still contain <item name="maui_edgetoedge_optout">true</item> can fail Android resource linking once the attr is no longer declared. Keep the attr as an unused compatibility resource, or provide a migration/deprecation path.
❌ Error — CI has broad PR-caused Android visual regressions
Prior test-failure analysis reports broad visual tests red on this PR and green on sampled net11.0 base builds, consistent with the edge-to-edge/system-bar rendering change. These baselines/failures need resolution before merge.
⚠️ Warning — Test page leaks/restores global theme state poorly
src/Controls/tests/TestCases.HostApp/Issues/Issue32987.cs:46 subscribes to Application.Current.RequestedThemeChanged without unsubscribing, and OnAppearing changes Application.Current.UserAppTheme globally at line 62 without restoring the prior value. In a reused test host/gallery, this can root old pages and affect later tests/pages.
Failure-Mode Probing
- App references old opt-out attr: Android resource linking can fail because the attr is no longer declared.
- Theme changes without activity recreation:
OnConfigurationChangedreapplies icon appearance, which is sound for handledUiMode. - Modal dialog windows: PR configures the dialog’s separate
Window, including config changes. - WebView fullscreen exit: no longer restores decor fitting, consistent with global edge-to-edge, but relies on CI visual baselines being updated.
- Test host reuse: the issue page can leak and leave global theme state changed.
Verdict: NEEDS_CHANGES
Confidence: low — this touches Android startup/window infrastructure and CI is not fully verifiable in-session.
Summary: The core approach is plausible, but the removed attr is a concrete compatibility break and prior CI analysis reports unresolved PR-attributed visual regressions. Do not merge until the compatibility path and failing checks are addressed.
🛠️ Fix — Analysis & Comparison
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | try-fix | Manual edge-to-edge setup in ConfigureTranslucentSystemBars; preserve maui_edgetoedge_optout attr and set default styles to opt in. |
✅ PASS | 8 files | Passes Issue32987; addresses prior critical attr compatibility concern; avoids AndroidX EnableEdgeToEdge as root mechanism. |
| PR | PR #36226 | Use AndroidX WindowCompat.EnableEdgeToEdge, remove old opt-out attr/theme items, reapply icon colors for activity/modal windows. |
✅ PASSED (Gate) | 8 implementation, 2 test | Original PR; gate passed but prior review flagged attr compatibility risk. |
Cross-Pollination
| Model | Round | New Ideas? | Details |
|---|---|---|---|
| gpt-5.5 + MAUI expert-review guidance | 1 | Yes | Manual edge-to-edge candidate using the existing ConfigureTranslucentSystemBars abstraction and preserving maui_edgetoedge_optout. |
Exhausted: No — stopped because Candidate #1 passed the Android gate regression test and is demonstrably better than the PR fix on the reviewed compatibility concern.
Selected Fix: Candidate #1 — It preserves the existing Android resource attr contract while passing the same Issue32987 Android UI tests that validated the PR fix.
📝 Recommended PR Title & Description
Assessment: ✏️ Recommend updating — the winning fix should preserve the maui_edgetoedge_optout attr declaration for compatibility, while the current description says it was removed.
Recommended title
[Android] Edge-to-edge: Enable native system bars and dynamic icon colors
Recommended description
> Targets **net11.0** (changes default Android edge-to-edge behavior for .NET 11).
### Description of Change
Migrates the Android backend from the partial, opt-out edge-to-edge setup to the native AndroidX `WindowCompat.EnableEdgeToEdge` API, per Google's recommended approach.
Previously MAUI used `WindowCompat.SetDecorFitsSystemWindows(window, false)` together with a `maui_edgetoedge_optout` theme flag that kept apps from going fully edge-to-edge by default — so system bars stayed opaque below API 35 and the 3-button navigation bar always drew a contrast scrim.
Committed so far:
* `MauiAppCompatActivity.OnCreate`: `SetDecorFitsSystemWindows(Window, false)` -> `WindowCompat.EnableEdgeToEdge(Window)`.
* Removed the default MAUI theme `maui_edgetoedge_optout` entries so edge-to-edge is the default (transparent bars on API < 35, no 3-button scrim), while keeping the attr declared for compatibility with existing app/library themes that still reference it.
* `WindowHandler.Android` and `MauiAppCompatActivity.OnConfigurationChanged`: apply/reapply system bar icon appearance from the current app theme because `EnableEdgeToEdge` handles transparency/scrim but not dynamic icon colors.
* `MauiWebChromeClient`: stopped toggling `SetDecorFitsSystemWindows` on fullscreen-video enter/exit (edge-to-edge is now always on).
* Modal pages: apply `EnableEdgeToEdge` to the modal's own `Window` and reapply system bar icon colors on modal configuration changes.
* Added Android UI coverage for transparent status/navigation bars, removal of the 3-button navigation contrast scrim, and status bar icon updates after light/dark theme changes.
Reference: [Android — Edge-to-edge](https://developer.android.com/develop/ui/views/layout/edge-to-edge)
🏁 Report — Final Recommendation
Comparative Fix Report — PR #36226
Candidates
| Rank | Candidate | Regression result | Assessment |
|---|---|---|---|
| 1 | pr-plus-reviewer |
Expected pass; only sandbox change is restoring an unused attr declaration on top of the gate-passing PR | Best balance. Keeps the PR's native AndroidX WindowCompat.EnableEdgeToEdge approach and modal/theme fixes, while addressing the expert reviewer's compatibility finding by preserving the shipped maui_edgetoedge_optout attr contract. |
| 2 | try-fix-1 |
✅ PASS (Issue32987, 2 tests) |
Strong alternative. It preserves maui_edgetoedge_optout, centralizes manual edge-to-edge setup in ConfigureTranslucentSystemBars, disables contrast enforcement, and passed the Android gate. Ranked below pr-plus-reviewer because it rejects the platform-recommended AndroidX EnableEdgeToEdge migration that the PR intentionally adopts. |
| 3 | pr |
✅ PASSED gate | Functionally validates the issue fix, but expert review found a high-confidence compatibility problem: deleting maui_edgetoedge_optout can break apps/libraries that still reference the shipped attr in Android themes. |
No STEP 5a candidate failed regression tests. Per the ranking rule, any candidate that had failed regression tests would be below the passing candidates above.
Winning candidate
Winner: pr-plus-reviewer
pr-plus-reviewer wins because it retains the raw PR's tested AndroidX edge-to-edge behavior and fixes the single actionable expert-review issue by keeping the legacy attr declared for resource compatibility. try-fix-1 is viable and passed the gate, but it takes a broader manual implementation path and is less aligned with the PR's stated migration to Google's recommended AndroidX API.
🧭 Next Steps — review latest findings
No alternative fix was selected for this run. Review the session findings and CI results before merging.
kubaflo
left a comment
There was a problem hiding this comment.
Could you please check if test failures are related?
This comment has been minimized.
This comment has been minimized.
Tests Failure Analysis
Test Failure Review: Not ready - click to expandOverall verdict: Not ready. 378 leg/failures are red on this PR but green across the 5 recent
Coverage: 138 checks · 98 passing · 40 failing · 0 pending · 0 inaccessible · 1 unmapped · 68 unexplained build legs · 0 unaccounted failing checks · 3 aborted failing checks · 0 canceled-build checks · 4 device-test unverified · 30 unattributed · 378 regressed-vs-base. Deterministic ceiling: Not ready — 378 leg/failures regressed vs base, plus unexplained legs, aborted checks and unverified device-tests. Builds (this PR): maui-pr 1503121, maui-pr-devicetests 1495102, maui-pr-uitests 1495101. Base sampling (net11.0, 5 recent builds per definition): maui-pr 1501450, maui-pr-devicetests 1501451, maui-pr-uitests 1501538. Recommended actionTreat the ~370 regressed UI visual-snapshot failures as PR-caused: verify whether the edge-to-edge change intentionally shifts layout (update/rebaseline the affected snapshots) or is an unintended regression, and have a human confirm the device-test and MacCatalyst legs before merge. |
This comment has been minimized.
This comment has been minimized.
kubaflo
left a comment
There was a problem hiding this comment.
Could you please resolve conflicts?
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!
Description of Change
Migrates the Android backend from the partial, opt-out edge-to-edge setup to the native AndroidX
WindowCompat.EnableEdgeToEdgeAPI, per Google's recommended approach.Previously MAUI used
WindowCompat.SetDecorFitsSystemWindows(window, false)together with amaui_edgetoedge_optouttheme flag that kept apps from going fully edge-to-edge by default — so system bars stayed opaque below API 35 and the 3‑button navigation bar always drew a contrast scrim.Committed so far:
MauiAppCompatActivity.OnCreate:SetDecorFitsSystemWindows(Window, false)→WindowCompat.EnableEdgeToEdge(Window).maui_edgetoedge_optoutattribute/theme entries so edge-to-edge is the default (transparent bars on API < 35, no 3‑button scrim).MauiWebChromeClient: stopped togglingSetDecorFitsSystemWindowson fullscreen-video enter/exit (edge-to-edge is now always on).EnableEdgeToEdgeto the modal's ownWindow.Reference: Android — Edge-to-edge
Screenshots