Repository navigation
[Android] Restore native theme colors instead of hardcoded defaults for Shell/TabbedPage appearance under Material 3 - #37147
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 37147Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 37147" |
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run maui-pr-uitests , maui-pr-devicetests |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
MauiBot
left a comment
There was a problem hiding this comment.
Expert Review — 8 findings
See inline comments for details.
This comment has been minimized.
This comment has been minimized.
|
Warning Your |
This comment has been minimized.
This comment has been minimized.
|
Note 🔍
|
MauiBot
left a comment
There was a problem hiding this comment.
Expert Review — 2 findings
See inline comments for details.
| // using its own DefaultColor as the GetColorForState fallback (matches the pattern used | ||
| // by ShellBottomNavViewAppearanceTracker.MakeColorStateList). CaptureNativeColors always | ||
| // runs before SetColors on Material3, so _originalTextColors is guaranteed non-null here. | ||
| var materialTitleArgb = title?.ToPlatform().ToArgb() ?? _originalTextColors.DefaultColor; |
There was a problem hiding this comment.
🔍 AI-Generated Review (multi-model)
❌ Error — [major] Logic and Correctness — In the Material3 path, both selected and unselected tab text colors fall back to _originalTextColors.DefaultColor when title/unselected are null. Concrete failure: a page that only sets tab bar background (or clears custom colors) collapses selected/unselected states to the same color, so active tab emphasis is lost.
|
|
||
| tabbedPage.BarBackgroundColor = null; | ||
|
|
||
| Assert.Equal( |
There was a problem hiding this comment.
🔍 AI-Generated Review (multi-model)
❌ Error — [critical] Regression Prevention and Test Coverage — This regression test is non-discriminating: it only asserts selected-state text/icon colors after clearing BarBackgroundColor, and it passed both without and with the fix. It does not exercise the bug condition needed to fail on the unfixed code path, so future regressions in restore behavior can merge undetected.
MauiBot
left a comment
There was a problem hiding this comment.
AI Review Summary
@SuthiYuvaraj — new AI review results are available based on commit
4b0c039.
🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix
Gate Result: ❌ FAILED
Platform: ANDROID · Base: inflight/current · Merge base: 8d30bd4f
🩺 Test does not reproduce the bug — ran the same in both states (PASS without fix, PASS with fix). The repro test is not exercising the issue. Strengthen the test before reviewing the fix.
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
📱 TabbedPageTests (ClearingBarBackgroundRestoresMaterial3ThemeColors) Category=TabbedPage |
❌ PASS — 1515s | ✅ PASS — 504s |
🔴 Without fix — 📱 TabbedPageTests (ClearingBarBackgroundRestoresMaterial3ThemeColors): PASS ❌ · 1515s
(no coded error found; showing last 1200 chars)
"totalMemoryBytes": 8322985984
},
"target": {
"kind": "emulator",
"name": "sdk_gphone_x86_64",
"identifier": "emulator-5554",
"operatingSystem": "Android",
"operatingSystemVersion": "11",
"apiLevel": 30,
"architecture": "x86_64",
"supportedArchitectures": [
"x86_64",
"x86",
"arm64-v8a",
"armeabi-v7a",
"armeabi"
],
"manufacturer": "Google",
"model": "sdk_gphone_x86_64",
"productName": "sdk_gphone_x86_64",
"buildFingerprint": "google/sdk_gphone_x86_64/generic_x86_64_arm64:11/RSR1.201211.001/7027799:user/release-keys",
"cpuModel": "0",
"cpuMaxFrequencyHertz": 2000,
"totalMemoryBytes": 2077544448
}
}
}
<<XHARNESS_RESULT_END>>
info: Attempting to remove apk 'com.microsoft.maui.controls.devicetests'..
info: Successfully uninstalled com.microsoft.maui.controls.devicetests
XHarness exit code: 0
Passed: 1
Failed: 0
Skipped: 0
Total: 1
Tests completed successfully
🟢 With fix — 📱 TabbedPageTests (ClearingBarBackgroundRestoresMaterial3ThemeColors): PASS ✅ · 504s
(no coded error found; showing last 1200 chars)
"totalMemoryBytes": 8322985984
},
"target": {
"kind": "emulator",
"name": "sdk_gphone_x86_64",
"identifier": "emulator-5554",
"operatingSystem": "Android",
"operatingSystemVersion": "11",
"apiLevel": 30,
"architecture": "x86_64",
"supportedArchitectures": [
"x86_64",
"x86",
"arm64-v8a",
"armeabi-v7a",
"armeabi"
],
"manufacturer": "Google",
"model": "sdk_gphone_x86_64",
"productName": "sdk_gphone_x86_64",
"buildFingerprint": "google/sdk_gphone_x86_64/generic_x86_64_arm64:11/RSR1.201211.001/7027799:user/release-keys",
"cpuModel": "0",
"cpuMaxFrequencyHertz": 2000,
"totalMemoryBytes": 2077544448
}
}
}
<<XHARNESS_RESULT_END>>
info: Attempting to remove apk 'com.microsoft.maui.controls.devicetests'..
info: Successfully uninstalled com.microsoft.maui.controls.devicetests
XHarness exit code: 0
Passed: 1
Failed: 0
Skipped: 0
Total: 1
Tests completed successfully
⚠️ Failure Details
- ❌ TabbedPageTests (ClearingBarBackgroundRestoresMaterial3ThemeColors) PASSED without fix (should fail) — tests don't catch the bug
📁 Fix files reverted (10 files)
src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellBottomNavViewAppearanceTracker.cssrc/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellContentFragment.cssrc/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellItemRenderer.cssrc/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellRenderer.cssrc/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellSectionRenderer.cssrc/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellTabLayoutAppearanceTracker.cssrc/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellToolbarAppearanceTracker.cssrc/Controls/src/Core/Platform/Android/TabbedPageManager.cssrc/Controls/src/Core/Shell/Shell.cssrc/Core/AndroidNative/maui/src/main/java/com/microsoft/maui/PlatformInterop.java
📋 Pre-Flight — Context & Validation
Issue: #35126 - [Android] Shell top-tab selected indicator color does not align with Material 3 spec
PR: #37147 - [Android] Restore native theme colors instead of hardcoded defaults for Shell/TabbedPage appearance under Material 3
Platforms Affected: Android
Files Changed: 10 implementation, 3 test
Key Findings
- The bug is that Material 3 Shell top tabs use a selected indicator color that does not match the native Material 3 specification in light and dark themes.
- The PR replaces hardcoded Material 3 fallbacks with a capture-and-restore strategy across Shell toolbar, top-tab, bottom-navigation, and TabbedPage code. It captures native colors/backgrounds once, restores them when appearance properties are null, removes the forced white Java bottom-navigation background, and reverts shared hardcoded Material 3 defaults.
- The committed change spans 13 files (+374/-79), including one Android device test and two updated Android snapshots.
- The gate failed because
ClearingBarBackgroundRestoresMaterial3ThemeColorspassed both without and with the PR fix. ItsCategory=TabbedPagerun therefore does not prove that the changed Material 3 semantics are exercised. - Existing PR discussion identifies risks around one-shot native-value capture becoming stale after runtime theme changes, preserving selected/unselected
ColorStateListstates, recovering the actual styled tab-indicator color, null capture fallbacks, and breadth beyond the single TabbedPage test.
Code Review Summary
Verdict: SKIPPED
Confidence: N/A
Errors: 0 | Warnings: 0 | Suggestions: 0
Key code review findings:
- Dedicated expert review is intentionally deferred to STEP 5b by the execution contract; no separate expert-review agent was launched in STEP 5a.
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #37147 | Capture native Android appearance once and restore it when Shell/TabbedPage appearance values are cleared | ❌ Gate failed | 10 implementation files | Primary device test passed without the fix, so behavior remains unvalidated |
🔬 Code Review — Deep Analysis
Code Review — PR #37147
Independent Assessment
What this changes: The Android Shell and TabbedPage paths replace several hardcoded fallback colors with per-view snapshots of native ColorStateList and background values, then restore those snapshots when MAUI appearance values are absent or cleared. The PR also stops forcing a white Shell bottom-navigation background and updates Android snapshots.
Inferred motivation: Preserve Material 3 theme styling for Shell toolbars, top tabs, bottom navigation, and TabbedPage instead of overwriting it with the legacy Material 2 palette.
Reconciliation with PR Narrative
Author claims: Native/theme-provided colors are captured before custom appearance is applied and restored when appearance values return to null.
Agreement/disagreement: The code broadly implements that strategy, but it does not faithfully preserve the native top-tab text state list: selected and unselected labels both fall back to DefaultColor. The submitted regression test also does not prove the claimed behavior because the trusted Gate observed it passing on both the broken baseline and PR head.
Prior Review Reconciliation
| Prior finding | Status | Current-head evidence |
|---|---|---|
ShellContentFragment omitted toolbar capture |
✅ Fixed | Current ShellContentFragment.OnCreateView calls CaptureNativeColors before registering the appearance observer. |
| Bottom-navigation reset could write uncaptured null values | ✅ Fixed | Current ResetAppearance gates native restoration on _originalAppearanceCaptured. |
Top-positioned TabbedPage did not restore its native background |
✅ Fixed | Current TabbedPageManager captures and restores _originalTabLayoutBackground. |
| Selected and unselected Shell top-tab text collapse to one color | ❌ Unresolved | ShellTabLayoutAppearanceTracker.SetColors uses _originalTextColors.DefaultColor for both roles. |
Nullable native TabTextColors is dereferenced without a fallback |
❌ Unresolved | _originalTextColors.DefaultColor remains unguarded after capture. |
A partial Material 3 toolbar appearance sets toolbarTracker.TintColor to null |
❌ Unresolved | SetColors uses foreground rather than foreground ?? _originalNativeTitleColor. |
The indicator “capture” assumes colorPrimary instead of the styled indicator color |
❌ Unresolved | CaptureNativeColors resolves Resource.Attribute.colorPrimary; custom tabIndicatorColor styling is not preserved. |
| One-shot captured values can become stale across an in-place theme change | All three Shell trackers retain one-way capture latches and expose no refresh path. | |
| The regression test is non-discriminating and does not cover the reported Shell top-tab indicator | ❌ Unresolved | The trusted Gate reports PASS without fix and PASS with fix; the only added test exercises bottom TabbedPage. |
Blast Radius Assessment
- Runs for all instances: The changed appearance plumbing affects every Android Shell or
TabbedPageusing these renderers; only the fallback behavior is Material 3-specific. - Startup impact: No new static initializer was added, but the snapshots are captured during native Shell/
TabbedPageview creation and affect initial appearance propagation. - Static/shared state: Existing static fallback lists remain; new captured state is instance-scoped.
- Lifecycle/theme changes: New renderer instances capture independently, but existing trackers have no recapture path if the themed native state changes in place.
- Null/default values: Null is a normal appearance input. The top-tab path currently assumes a non-null native
TabTextColors, and partial toolbar appearance can still propagate a null tint.
CI Status
- Trusted Gate: ❌ Failed —
ClearingBarBackgroundRestoresMaterial3ThemeColorspassed both without and with the fix. - Current public head:
maui-pris failing, including Windows Debug; the anonymous combined status is pending because other contexts have not completed. - Classification: Undetermined under this bounded review; no clean-CI claim is made.
Findings
❌ Error — Material 3 top-tab selected and unselected text states collapse
src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellTabLayoutAppearanceTracker.cs:60
When TitleColor and UnselectedColor are null, both values passed to SetTabTextColors come from _originalTextColors.DefaultColor. A default Material 3 Shell top-tab strip therefore loses the selected-state text contrast that the native ColorStateList supplied. The selected fallback must query the captured selected state, while the unselected fallback should retain the default state; both need a safe theme fallback if the native list is null.
❌ Error — Added regression test does not distinguish the fix
src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.Android.cs:104
The test checks selected-state text/icon values around a BarBackgroundColor change, but those values already remain unchanged on the merge base. The trusted Gate consequently passed the same test in both states. It neither exercises the reported Shell top-tab selected-indicator path nor proves that native Material 3 fallback semantics were restored.
Failure-Mode Probing
- Partial Shell appearance: With only a background set, null title/unselected colors are rewritten to the same default color, so selected-state emphasis is lost.
- Custom theme with no resolved
tabTextColor: Capture can yield a nullTabTextColors; the first partial/defaultSetAppearancecan dereference it. - Set then clear: Background snapshots are restored, but selected text-state fidelity is already lost in
SetColors; clearing does not recover it unlessResetAppearancereplaces the complete native list. - Runtime light/dark change without renderer recreation: The one-way capture latches retain the old theme values; this remains an unverified adjacent scenario.
- Disconnect/reconnect: State is tracker-instance scoped and disposed with the renderer, but no test covers recreation or appearance reset after navigation.
External Output Contract
Not applicable.
Verdict: NEEDS_CHANGES
Confidence: low
The top-tab state-list regression is a concrete correctness defect in platform-specific Shell plumbing, and the submitted test is proven non-discriminating. The broad capture/restore direction is plausible, but the failed Gate, unresolved prior findings, and red/undetermined CI prevent approval.
🛠️ Try-Fix — Analysis & Comparison
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | gpt-5.3-codex / try-fix | Resolve current Material theme attributes at appearance-application time instead of restoring a one-shot native snapshot | None | Baseline script rejected the pre-existing dirty harness worktree before implementation | |
| 2 | gpt-5.6-sol / try-fix | Leave unspecified values under native ownership and recreate a themed Android widget when an explicit override is cleared | None | Same baseline-safety blocker; deliberately avoids both snapshots and dynamic attribute lookup | |
| PR | PR #37147 | Capture native colors/backgrounds once and restore them when appearance values are cleared | ❌ Gate failed | 10 implementation files | Primary device test passed both without and with the PR fix |
Candidate 1 Narrative
Approach: Dynamically resolve Material theme attributes whenever appearance is applied. This differs at the mechanism level from the PR because it avoids cached native ColorStateList/drawable state and would follow live light/dark theme changes.
Diff:
(no code changes applied; blocked before implementation)Primary test: pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Controls -Platform android -TestFilter "Category=TabbedPage" — NOT RUN.
Regression test: dotnet test src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj --filter "ShellToolbarTests" — NOT RUN because the primary test did not run.
Result: Blocked.
Failure analysis: EstablishBrokenBaseline.ps1 aborted because the worktree contains pre-existing modified harness files. The try-fix restoration contract prohibits manual cleanup, so Candidate 1 made no edits and ran the mandatory restore command, which confirmed no baseline state existed. Inline self-review recorded 0 findings.
Candidate 2 Narrative
Approach: Keep Android in control whenever an appearance value is null. Track only whether MAUI applied an explicit override; on an explicit-to-null transition, recreate the affected toolbar, TabLayout, or bottom-navigation widget through its lifecycle so the current themed context reapplies the complete widget style.
Mechanism-level difference: Unlike PR #37147, Candidate 2 stores no native visual snapshot. Unlike Candidate 1, it synthesizes no value from theme attributes. Recreating the widget would preserve app-specific styles, selected/unselected state lists, and the actual styled indicator under the current theme.
Diff:
(no code changes applied; blocked before implementation)Primary test: pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Controls -Platform android -TestFilter "Category=TabbedPage" — NOT RUN.
Regression test: dotnet test src/Controls/tests/Core.UnitTests/Controls.Core.UnitTests.csproj --filter "ShellToolbarTests" — NOT RUN because the primary test did not run.
Result: Blocked.
Failure analysis: Candidate 2 encountered the same pre-existing dirty harness worktree. Without .github/.baseline-state.json and its RevertedFiles allow-list, implementation would violate restoration safety. It made no edits, ran the mandatory restore command, and recorded 0 inline self-review findings.
Cross-Pollination
Skipped by the STEP 5a execution contract.
Exhausted: Yes — both permitted model attempts were invoked once; no cross-pollination or follow-up agents were launched.
Selected Fix: None — both alternatives were blocked before implementation or testing, and the PR fix remains unvalidated because the gate test is non-discriminating.
🏁 Report — Final Recommendation
⚠️ Final Recommendation: REQUEST CHANGES
Winner: pr
The raw submitted PR is the winner only by elimination: it is the sole fully implemented candidate that was not blocked before implementation and did not introduce a known compile failure. It is not ready to approve. The trusted Gate failed because its regression test passed both without and with the fix, and the expert review found a concrete Material 3 top-tab state regression plus unresolved adjacent risks.
Comparative ranking
| Rank | Candidate | Approach | Validation evidence | Decision |
|---|---|---|---|---|
| 1 | pr |
Capture native Android Shell/TabbedPage colors and backgrounds once, then restore them when appearance values are null or cleared. |
Gate ❌ FAILED: ClearingBarBackgroundRestoresMaterial3ThemeColors passed on both baseline and PR head. Current public maui-pr is red/undetermined. |
Best available implemented candidate, but selected/unselected Shell top-tab text states collapse and the test does not prove the fix. |
| 2 | pr-plus-reviewer |
Raw PR plus lazy/null-safe top-tab capture, distinct selected/default state restoration, aligned toolbar tint fallback, and a focused Material 3 state-list test. | Primary ❌ FAIL: Android device-test project did not compile (CS1503, int cannot convert to Android.Graphics.Color). Ordered regressions were not eligible. |
Directionally improves the expert findings, but a non-compiling candidate cannot displace the raw PR. No repair/retest loop was permitted. |
| 3 | try-fix-1 |
Resolve current Material theme attributes at appearance-application time rather than restoring a one-shot snapshot. | Plausible response to stale theme snapshots, but there is no candidate diff or empirical evidence. | |
| 4 | try-fix-2 |
Leave null appearance values under native ownership and recreate affected native widgets after an explicit override is cleared. | Unvalidated and carries the largest renderer lifecycle/rebinding risk. |
No candidate passed the required regression tests. The raw PR's Gate failure is a test-validity failure rather than evidence that production behavior is correct; pr-plus-reviewer failed before tests executed; both try-fix-* candidates were blocked before implementation.
Regression-risk cross-reference
The deterministic regression scan reports OVERLAP, not REVERT: Shell.cs also intersects #36673, which fixed #36562, but only on different lines (revert_count: 0). Its mapped ShellToolbarTests regression remains relevant; it was not run for pr-plus-reviewer because the ordered primary Android command failed compilation.
Expert finding reconciliation
The sole expert-review path wrote two inline errors:
ShellTabLayoutAppearanceTracker.SetColorsuses_originalTextColors.DefaultColorfor both selected and unselected Material 3 labels. With a partial/default appearance, active and inactive top-tab text becomes indistinguishable.- The submitted Android device test is non-discriminating. The trusted Gate proves the assertion passes without the production fix and the test does not exercise the reported Shell top-tab indicator path.
Prior review surfaces show that the current head fixed earlier omissions for ShellContentFragment toolbar capture, uncaptured bottom-navigation reset, and top-positioned TabbedPage background restoration. Still unresolved are the nullable TabTextColors dereference, null toolbar tracker tint on partial appearance, colorPrimary standing in for an app-styled indicator color, one-shot theme snapshot staleness, and broader Shell/Material 2 coverage.
Why pr-plus-reviewer did not win
Its design is the strongest of the refinements because it preserves the native text-state distinction and makes capture self-contained. However, the one allowed Android command exposed a binding-type error before execution. The hard execution contract forbids correcting and rerunning it, and candidates with known build failures must rank below an otherwise buildable submitted change.
Required changes before approval
- Preserve the selected entry from the native top-tab
ColorStateListinstead of assigningDefaultColorto both states, with a null-safe fallback compatible with the Android binding type. - Add a baseline-discriminating Android regression test for the actual Shell top-tab selected indicator/text-state behavior; it must not green-pass by returning when Material 3 is disabled.
- Reconcile the remaining prior-review risks, especially partial toolbar tinting, custom
tabIndicatorColor, and runtime theme changes. - Run the overlap-mapped
ShellToolbarTestsafter the primary Android validation succeeds. - Obtain a passing Gate and required CI evidence.
Final rationale
pr wins the comparison because every alternative is either non-compiling or unimplemented, so winner.json identifies it as the PR fix. The failed Gate and concrete expert error make APPROVE impermissible; the submitted PR needs changes even though no current candidate safely supersedes it.
🔗 Regression Cross-Reference
🔍 Regression Cross-Reference
⚠ Overlaps with prior bug-fix PRs — same files modified, but no exact line revert detected.
| File | Fix PR | Fixed issue(s) |
|---|---|---|
src/Controls/src/Core/Shell/Shell.cs |
#36673 | #36562 |
🧪 Regression Tests to Verify
These tests were added by the overlapping fix PRs. Running them to verify no side-effect regressions:
| Fix PR | Type | Test | Filter |
|---|---|---|---|
| #36673 | UnitTest | ShellToolbarTests | ShellToolbarTests |
🧪 Regression Test Results
✅ PASSED — 1 passed, 0 failed, 0 skipped
| Fix PR | Test | Type | Result |
|---|---|---|---|
| #36673 | ShellToolbarTests | UnitTest | ✅ PASSED |
📱 UI Tests — Shell
Detected UI test categories: Shell
❌ Deep UI tests — 336 passed, 2 failed, 13 skipped across 1 category on platform-pool agent (replaces in-process counts above).
🧪 UI Test Execution Results (deep, platform pool)
| Category | Tests | Snapshot diffs |
|---|---|---|
Shell |
336/351 (2 ❌, 13 skipped) | — |
🔍 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 unrelated: the failures appear pre-existing, flaky, or infrastructure.
- ● Unrelated — Shell setup/state element-discovery timeouts (~2 tests): Both fail in generic
WaitForElementsetup locators—one before clear/recreate begins and one on theOptionsbutton in an explicitly order-dependent suite—without an exception or assertion tied to the PR's Android Shell appearance/background changes.
❌ Shell — 2 failed tests
ClearAndRecreateShellElements
System.TimeoutException : Timed out waiting for element...
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 2790
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 2817
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 826
at Microsoft.Maui.TestCases.Tests.Issues.ShellItemIsVisible.ClearAndRecreateShellElements() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/XFIssue/ShellItemIsVisible.cs:line 66
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* arg
...
VerifyShellSearch_IsSearchEnabledFalse
System.TimeoutException : Timed out waiting for element...
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 2790
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 2817
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 826
at Microsoft.Maui.TestCases.Tests.ShellSearchHandlerFeatureTests.OpenOptions() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ShellSearchHandlerFeatureTests.cs:line 47
at Microsoft.Maui.TestCases.Tests.ShellSearchHandlerFeatureTests.VerifyShellSearch_IsSear
...
📎 Download drop-deep-uitests artifact (TRX + snapshot diffs)
🧭 Next Steps — review latest findings
No alternative fix was selected for this run. Review the session findings and CI results before merging.
…or Shell/TabbedPage appearance under Material 3 (#37147) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When Material 3 is enabled via <UseMaterial3>true</UseMaterial3>, Android Shell top tabs correctly show the selected state, but the selected indicator color does not match the Material 3 tabs specification. ### Root Cause Android Shell/TabbedPage rendering (`ShellToolbarAppearanceTracker`,` ShellTabLayoutAppearanceTracker`, `ShellBottomNavViewAppearanceTracker`, `TabbedPageManager`) fell back to hardcoded default colors whenever a Shell.TabBar*/appearance color property was null. Under Material 3, this hardcoded fallback overrode the native M3 theme's own default colors (colorPrimary, colorOnSurface, etc.), so M3 apps never displayed correct theme colors on the Shell toolbar, top tabs (TabLayout), or bottom navigation (BottomNavigationView) unless every single color was explicitly set. ### Description of Change - Each Android tracker captures the platform view's native/theme-provided color or background once, before any custom appearance is ever applied to it. - When a `Shell.TabBar*` color is later cleared back to null (e.g. removing a custom appearance), the tracker restores the originally-captured native value instead of substituting a hardcoded color. - This means M3 apps now correctly fall back to their native theme colors — matching platform conventions — rather than being forced into an unrelated hardcoded palette. ### Issues Fixed Fixes #35126 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Case| Light Theme | Dark Theme | |----------|----------|----------| | **Before**|<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/e8a6cc5f-5101-4d8d-9f0b-b199710b5da8">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/23b6e57c-34fd-48d3-8c92-0b18f2df4ea9">| | **After** |<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/d732e3bc-6a53-4cd8-93a9-c559576d0d5c">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/9c6ebe0f-b7ce-4d24-8d76-cad6f25cd785">|
…or Shell/TabbedPage appearance under Material 3 (#37147) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When Material 3 is enabled via <UseMaterial3>true</UseMaterial3>, Android Shell top tabs correctly show the selected state, but the selected indicator color does not match the Material 3 tabs specification. ### Root Cause Android Shell/TabbedPage rendering (`ShellToolbarAppearanceTracker`,` ShellTabLayoutAppearanceTracker`, `ShellBottomNavViewAppearanceTracker`, `TabbedPageManager`) fell back to hardcoded default colors whenever a Shell.TabBar*/appearance color property was null. Under Material 3, this hardcoded fallback overrode the native M3 theme's own default colors (colorPrimary, colorOnSurface, etc.), so M3 apps never displayed correct theme colors on the Shell toolbar, top tabs (TabLayout), or bottom navigation (BottomNavigationView) unless every single color was explicitly set. ### Description of Change - Each Android tracker captures the platform view's native/theme-provided color or background once, before any custom appearance is ever applied to it. - When a `Shell.TabBar*` color is later cleared back to null (e.g. removing a custom appearance), the tracker restores the originally-captured native value instead of substituting a hardcoded color. - This means M3 apps now correctly fall back to their native theme colors — matching platform conventions — rather than being forced into an unrelated hardcoded palette. ### Issues Fixed Fixes #35126 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Case| Light Theme | Dark Theme | |----------|----------|----------| | **Before**|<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/e8a6cc5f-5101-4d8d-9f0b-b199710b5da8">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/23b6e57c-34fd-48d3-8c92-0b18f2df4ea9">| | **After** |<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/d732e3bc-6a53-4cd8-93a9-c559576d0d5c">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/9c6ebe0f-b7ce-4d24-8d76-cad6f25cd785">|
…or Shell/TabbedPage appearance under Material 3 (#37147) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When Material 3 is enabled via <UseMaterial3>true</UseMaterial3>, Android Shell top tabs correctly show the selected state, but the selected indicator color does not match the Material 3 tabs specification. ### Root Cause Android Shell/TabbedPage rendering (`ShellToolbarAppearanceTracker`,` ShellTabLayoutAppearanceTracker`, `ShellBottomNavViewAppearanceTracker`, `TabbedPageManager`) fell back to hardcoded default colors whenever a Shell.TabBar*/appearance color property was null. Under Material 3, this hardcoded fallback overrode the native M3 theme's own default colors (colorPrimary, colorOnSurface, etc.), so M3 apps never displayed correct theme colors on the Shell toolbar, top tabs (TabLayout), or bottom navigation (BottomNavigationView) unless every single color was explicitly set. ### Description of Change - Each Android tracker captures the platform view's native/theme-provided color or background once, before any custom appearance is ever applied to it. - When a `Shell.TabBar*` color is later cleared back to null (e.g. removing a custom appearance), the tracker restores the originally-captured native value instead of substituting a hardcoded color. - This means M3 apps now correctly fall back to their native theme colors — matching platform conventions — rather than being forced into an unrelated hardcoded palette. ### Issues Fixed Fixes #35126 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Case| Light Theme | Dark Theme | |----------|----------|----------| | **Before**|<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/e8a6cc5f-5101-4d8d-9f0b-b199710b5da8">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/23b6e57c-34fd-48d3-8c92-0b18f2df4ea9">| | **After** |<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/d732e3bc-6a53-4cd8-93a9-c559576d0d5c">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/9c6ebe0f-b7ce-4d24-8d76-cad6f25cd785">|
…or Shell/TabbedPage appearance under Material 3 (#37147) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When Material 3 is enabled via <UseMaterial3>true</UseMaterial3>, Android Shell top tabs correctly show the selected state, but the selected indicator color does not match the Material 3 tabs specification. ### Root Cause Android Shell/TabbedPage rendering (`ShellToolbarAppearanceTracker`,` ShellTabLayoutAppearanceTracker`, `ShellBottomNavViewAppearanceTracker`, `TabbedPageManager`) fell back to hardcoded default colors whenever a Shell.TabBar*/appearance color property was null. Under Material 3, this hardcoded fallback overrode the native M3 theme's own default colors (colorPrimary, colorOnSurface, etc.), so M3 apps never displayed correct theme colors on the Shell toolbar, top tabs (TabLayout), or bottom navigation (BottomNavigationView) unless every single color was explicitly set. ### Description of Change - Each Android tracker captures the platform view's native/theme-provided color or background once, before any custom appearance is ever applied to it. - When a `Shell.TabBar*` color is later cleared back to null (e.g. removing a custom appearance), the tracker restores the originally-captured native value instead of substituting a hardcoded color. - This means M3 apps now correctly fall back to their native theme colors — matching platform conventions — rather than being forced into an unrelated hardcoded palette. ### Issues Fixed Fixes #35126 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Case| Light Theme | Dark Theme | |----------|----------|----------| | **Before**|<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/e8a6cc5f-5101-4d8d-9f0b-b199710b5da8">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/23b6e57c-34fd-48d3-8c92-0b18f2df4ea9">| | **After** |<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/d732e3bc-6a53-4cd8-93a9-c559576d0d5c">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/9c6ebe0f-b7ce-4d24-8d76-cad6f25cd785">|
…or Shell/TabbedPage appearance under Material 3 (#37147) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When Material 3 is enabled via <UseMaterial3>true</UseMaterial3>, Android Shell top tabs correctly show the selected state, but the selected indicator color does not match the Material 3 tabs specification. ### Root Cause Android Shell/TabbedPage rendering (`ShellToolbarAppearanceTracker`,` ShellTabLayoutAppearanceTracker`, `ShellBottomNavViewAppearanceTracker`, `TabbedPageManager`) fell back to hardcoded default colors whenever a Shell.TabBar*/appearance color property was null. Under Material 3, this hardcoded fallback overrode the native M3 theme's own default colors (colorPrimary, colorOnSurface, etc.), so M3 apps never displayed correct theme colors on the Shell toolbar, top tabs (TabLayout), or bottom navigation (BottomNavigationView) unless every single color was explicitly set. ### Description of Change - Each Android tracker captures the platform view's native/theme-provided color or background once, before any custom appearance is ever applied to it. - When a `Shell.TabBar*` color is later cleared back to null (e.g. removing a custom appearance), the tracker restores the originally-captured native value instead of substituting a hardcoded color. - This means M3 apps now correctly fall back to their native theme colors — matching platform conventions — rather than being forced into an unrelated hardcoded palette. ### Issues Fixed Fixes #35126 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Case| Light Theme | Dark Theme | |----------|----------|----------| | **Before**|<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/e8a6cc5f-5101-4d8d-9f0b-b199710b5da8">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/23b6e57c-34fd-48d3-8c92-0b18f2df4ea9">| | **After** |<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/d732e3bc-6a53-4cd8-93a9-c559576d0d5c">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/9c6ebe0f-b7ce-4d24-8d76-cad6f25cd785">|
…or Shell/TabbedPage appearance under Material 3 (#37147) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When Material 3 is enabled via <UseMaterial3>true</UseMaterial3>, Android Shell top tabs correctly show the selected state, but the selected indicator color does not match the Material 3 tabs specification. ### Root Cause Android Shell/TabbedPage rendering (`ShellToolbarAppearanceTracker`,` ShellTabLayoutAppearanceTracker`, `ShellBottomNavViewAppearanceTracker`, `TabbedPageManager`) fell back to hardcoded default colors whenever a Shell.TabBar*/appearance color property was null. Under Material 3, this hardcoded fallback overrode the native M3 theme's own default colors (colorPrimary, colorOnSurface, etc.), so M3 apps never displayed correct theme colors on the Shell toolbar, top tabs (TabLayout), or bottom navigation (BottomNavigationView) unless every single color was explicitly set. ### Description of Change - Each Android tracker captures the platform view's native/theme-provided color or background once, before any custom appearance is ever applied to it. - When a `Shell.TabBar*` color is later cleared back to null (e.g. removing a custom appearance), the tracker restores the originally-captured native value instead of substituting a hardcoded color. - This means M3 apps now correctly fall back to their native theme colors — matching platform conventions — rather than being forced into an unrelated hardcoded palette. ### Issues Fixed Fixes #35126 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Case| Light Theme | Dark Theme | |----------|----------|----------| | **Before**|<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/e8a6cc5f-5101-4d8d-9f0b-b199710b5da8">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/23b6e57c-34fd-48d3-8c92-0b18f2df4ea9">| | **After** |<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/d732e3bc-6a53-4cd8-93a9-c559576d0d5c">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/9c6ebe0f-b7ce-4d24-8d76-cad6f25cd785">|
…or Shell/TabbedPage appearance under Material 3 (#37147) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When Material 3 is enabled via <UseMaterial3>true</UseMaterial3>, Android Shell top tabs correctly show the selected state, but the selected indicator color does not match the Material 3 tabs specification. ### Root Cause Android Shell/TabbedPage rendering (`ShellToolbarAppearanceTracker`,` ShellTabLayoutAppearanceTracker`, `ShellBottomNavViewAppearanceTracker`, `TabbedPageManager`) fell back to hardcoded default colors whenever a Shell.TabBar*/appearance color property was null. Under Material 3, this hardcoded fallback overrode the native M3 theme's own default colors (colorPrimary, colorOnSurface, etc.), so M3 apps never displayed correct theme colors on the Shell toolbar, top tabs (TabLayout), or bottom navigation (BottomNavigationView) unless every single color was explicitly set. ### Description of Change - Each Android tracker captures the platform view's native/theme-provided color or background once, before any custom appearance is ever applied to it. - When a `Shell.TabBar*` color is later cleared back to null (e.g. removing a custom appearance), the tracker restores the originally-captured native value instead of substituting a hardcoded color. - This means M3 apps now correctly fall back to their native theme colors — matching platform conventions — rather than being forced into an unrelated hardcoded palette. ### Issues Fixed Fixes #35126 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Case| Light Theme | Dark Theme | |----------|----------|----------| | **Before**|<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/e8a6cc5f-5101-4d8d-9f0b-b199710b5da8">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/23b6e57c-34fd-48d3-8c92-0b18f2df4ea9">| | **After** |<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/d732e3bc-6a53-4cd8-93a9-c559576d0d5c">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/9c6ebe0f-b7ce-4d24-8d76-cad6f25cd785">|
…or Shell/TabbedPage appearance under Material 3 (#37147) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When Material 3 is enabled via <UseMaterial3>true</UseMaterial3>, Android Shell top tabs correctly show the selected state, but the selected indicator color does not match the Material 3 tabs specification. ### Root Cause Android Shell/TabbedPage rendering (`ShellToolbarAppearanceTracker`,` ShellTabLayoutAppearanceTracker`, `ShellBottomNavViewAppearanceTracker`, `TabbedPageManager`) fell back to hardcoded default colors whenever a Shell.TabBar*/appearance color property was null. Under Material 3, this hardcoded fallback overrode the native M3 theme's own default colors (colorPrimary, colorOnSurface, etc.), so M3 apps never displayed correct theme colors on the Shell toolbar, top tabs (TabLayout), or bottom navigation (BottomNavigationView) unless every single color was explicitly set. ### Description of Change - Each Android tracker captures the platform view's native/theme-provided color or background once, before any custom appearance is ever applied to it. - When a `Shell.TabBar*` color is later cleared back to null (e.g. removing a custom appearance), the tracker restores the originally-captured native value instead of substituting a hardcoded color. - This means M3 apps now correctly fall back to their native theme colors — matching platform conventions — rather than being forced into an unrelated hardcoded palette. ### Issues Fixed Fixes #35126 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Case| Light Theme | Dark Theme | |----------|----------|----------| | **Before**|<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/e8a6cc5f-5101-4d8d-9f0b-b199710b5da8">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/23b6e57c-34fd-48d3-8c92-0b18f2df4ea9">| | **After** |<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/d732e3bc-6a53-4cd8-93a9-c559576d0d5c">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/9c6ebe0f-b7ce-4d24-8d76-cad6f25cd785">|
…or Shell/TabbedPage appearance under Material 3 (#37147) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When Material 3 is enabled via <UseMaterial3>true</UseMaterial3>, Android Shell top tabs correctly show the selected state, but the selected indicator color does not match the Material 3 tabs specification. ### Root Cause Android Shell/TabbedPage rendering (`ShellToolbarAppearanceTracker`,` ShellTabLayoutAppearanceTracker`, `ShellBottomNavViewAppearanceTracker`, `TabbedPageManager`) fell back to hardcoded default colors whenever a Shell.TabBar*/appearance color property was null. Under Material 3, this hardcoded fallback overrode the native M3 theme's own default colors (colorPrimary, colorOnSurface, etc.), so M3 apps never displayed correct theme colors on the Shell toolbar, top tabs (TabLayout), or bottom navigation (BottomNavigationView) unless every single color was explicitly set. ### Description of Change - Each Android tracker captures the platform view's native/theme-provided color or background once, before any custom appearance is ever applied to it. - When a `Shell.TabBar*` color is later cleared back to null (e.g. removing a custom appearance), the tracker restores the originally-captured native value instead of substituting a hardcoded color. - This means M3 apps now correctly fall back to their native theme colors — matching platform conventions — rather than being forced into an unrelated hardcoded palette. ### Issues Fixed Fixes #35126 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Case| Light Theme | Dark Theme | |----------|----------|----------| | **Before**|<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/e8a6cc5f-5101-4d8d-9f0b-b199710b5da8">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/23b6e57c-34fd-48d3-8c92-0b18f2df4ea9">| | **After** |<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/d732e3bc-6a53-4cd8-93a9-c559576d0d5c">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/9c6ebe0f-b7ce-4d24-8d76-cad6f25cd785">|
…or Shell/TabbedPage appearance under Material 3 (#37147) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When Material 3 is enabled via <UseMaterial3>true</UseMaterial3>, Android Shell top tabs correctly show the selected state, but the selected indicator color does not match the Material 3 tabs specification. ### Root Cause Android Shell/TabbedPage rendering (`ShellToolbarAppearanceTracker`,` ShellTabLayoutAppearanceTracker`, `ShellBottomNavViewAppearanceTracker`, `TabbedPageManager`) fell back to hardcoded default colors whenever a Shell.TabBar*/appearance color property was null. Under Material 3, this hardcoded fallback overrode the native M3 theme's own default colors (colorPrimary, colorOnSurface, etc.), so M3 apps never displayed correct theme colors on the Shell toolbar, top tabs (TabLayout), or bottom navigation (BottomNavigationView) unless every single color was explicitly set. ### Description of Change - Each Android tracker captures the platform view's native/theme-provided color or background once, before any custom appearance is ever applied to it. - When a `Shell.TabBar*` color is later cleared back to null (e.g. removing a custom appearance), the tracker restores the originally-captured native value instead of substituting a hardcoded color. - This means M3 apps now correctly fall back to their native theme colors — matching platform conventions — rather than being forced into an unrelated hardcoded palette. ### Issues Fixed Fixes #35126 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Case| Light Theme | Dark Theme | |----------|----------|----------| | **Before**|<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/e8a6cc5f-5101-4d8d-9f0b-b199710b5da8">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/23b6e57c-34fd-48d3-8c92-0b18f2df4ea9">| | **After** |<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/d732e3bc-6a53-4cd8-93a9-c559576d0d5c">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/9c6ebe0f-b7ce-4d24-8d76-cad6f25cd785">|
…or Shell/TabbedPage appearance under Material 3 (#37147) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When Material 3 is enabled via <UseMaterial3>true</UseMaterial3>, Android Shell top tabs correctly show the selected state, but the selected indicator color does not match the Material 3 tabs specification. ### Root Cause Android Shell/TabbedPage rendering (`ShellToolbarAppearanceTracker`,` ShellTabLayoutAppearanceTracker`, `ShellBottomNavViewAppearanceTracker`, `TabbedPageManager`) fell back to hardcoded default colors whenever a Shell.TabBar*/appearance color property was null. Under Material 3, this hardcoded fallback overrode the native M3 theme's own default colors (colorPrimary, colorOnSurface, etc.), so M3 apps never displayed correct theme colors on the Shell toolbar, top tabs (TabLayout), or bottom navigation (BottomNavigationView) unless every single color was explicitly set. ### Description of Change - Each Android tracker captures the platform view's native/theme-provided color or background once, before any custom appearance is ever applied to it. - When a `Shell.TabBar*` color is later cleared back to null (e.g. removing a custom appearance), the tracker restores the originally-captured native value instead of substituting a hardcoded color. - This means M3 apps now correctly fall back to their native theme colors — matching platform conventions — rather than being forced into an unrelated hardcoded palette. ### Issues Fixed Fixes #35126 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Case| Light Theme | Dark Theme | |----------|----------|----------| | **Before**|<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/e8a6cc5f-5101-4d8d-9f0b-b199710b5da8">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/23b6e57c-34fd-48d3-8c92-0b18f2df4ea9">| | **After** |<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/d732e3bc-6a53-4cd8-93a9-c559576d0d5c">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/9c6ebe0f-b7ce-4d24-8d76-cad6f25cd785">|
…or Shell/TabbedPage appearance under Material 3 (#37147) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When Material 3 is enabled via <UseMaterial3>true</UseMaterial3>, Android Shell top tabs correctly show the selected state, but the selected indicator color does not match the Material 3 tabs specification. ### Root Cause Android Shell/TabbedPage rendering (`ShellToolbarAppearanceTracker`,` ShellTabLayoutAppearanceTracker`, `ShellBottomNavViewAppearanceTracker`, `TabbedPageManager`) fell back to hardcoded default colors whenever a Shell.TabBar*/appearance color property was null. Under Material 3, this hardcoded fallback overrode the native M3 theme's own default colors (colorPrimary, colorOnSurface, etc.), so M3 apps never displayed correct theme colors on the Shell toolbar, top tabs (TabLayout), or bottom navigation (BottomNavigationView) unless every single color was explicitly set. ### Description of Change - Each Android tracker captures the platform view's native/theme-provided color or background once, before any custom appearance is ever applied to it. - When a `Shell.TabBar*` color is later cleared back to null (e.g. removing a custom appearance), the tracker restores the originally-captured native value instead of substituting a hardcoded color. - This means M3 apps now correctly fall back to their native theme colors — matching platform conventions — rather than being forced into an unrelated hardcoded palette. ### Issues Fixed Fixes #35126 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Case| Light Theme | Dark Theme | |----------|----------|----------| | **Before**|<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/e8a6cc5f-5101-4d8d-9f0b-b199710b5da8">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/23b6e57c-34fd-48d3-8c92-0b18f2df4ea9">| | **After** |<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/d732e3bc-6a53-4cd8-93a9-c559576d0d5c">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/9c6ebe0f-b7ce-4d24-8d76-cad6f25cd785">|
…or Shell/TabbedPage appearance under Material 3 (#37147) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When Material 3 is enabled via <UseMaterial3>true</UseMaterial3>, Android Shell top tabs correctly show the selected state, but the selected indicator color does not match the Material 3 tabs specification. ### Root Cause Android Shell/TabbedPage rendering (`ShellToolbarAppearanceTracker`,` ShellTabLayoutAppearanceTracker`, `ShellBottomNavViewAppearanceTracker`, `TabbedPageManager`) fell back to hardcoded default colors whenever a Shell.TabBar*/appearance color property was null. Under Material 3, this hardcoded fallback overrode the native M3 theme's own default colors (colorPrimary, colorOnSurface, etc.), so M3 apps never displayed correct theme colors on the Shell toolbar, top tabs (TabLayout), or bottom navigation (BottomNavigationView) unless every single color was explicitly set. ### Description of Change - Each Android tracker captures the platform view's native/theme-provided color or background once, before any custom appearance is ever applied to it. - When a `Shell.TabBar*` color is later cleared back to null (e.g. removing a custom appearance), the tracker restores the originally-captured native value instead of substituting a hardcoded color. - This means M3 apps now correctly fall back to their native theme colors — matching platform conventions — rather than being forced into an unrelated hardcoded palette. ### Issues Fixed Fixes #35126 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Case| Light Theme | Dark Theme | |----------|----------|----------| | **Before**|<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/e8a6cc5f-5101-4d8d-9f0b-b199710b5da8">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/23b6e57c-34fd-48d3-8c92-0b18f2df4ea9">| | **After** |<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/d732e3bc-6a53-4cd8-93a9-c559576d0d5c">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/9c6ebe0f-b7ce-4d24-8d76-cad6f25cd785">|
…or Shell/TabbedPage appearance under Material 3 (#37147) <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Issue Description When Material 3 is enabled via <UseMaterial3>true</UseMaterial3>, Android Shell top tabs correctly show the selected state, but the selected indicator color does not match the Material 3 tabs specification. ### Root Cause Android Shell/TabbedPage rendering (`ShellToolbarAppearanceTracker`,` ShellTabLayoutAppearanceTracker`, `ShellBottomNavViewAppearanceTracker`, `TabbedPageManager`) fell back to hardcoded default colors whenever a Shell.TabBar*/appearance color property was null. Under Material 3, this hardcoded fallback overrode the native M3 theme's own default colors (colorPrimary, colorOnSurface, etc.), so M3 apps never displayed correct theme colors on the Shell toolbar, top tabs (TabLayout), or bottom navigation (BottomNavigationView) unless every single color was explicitly set. ### Description of Change - Each Android tracker captures the platform view's native/theme-provided color or background once, before any custom appearance is ever applied to it. - When a `Shell.TabBar*` color is later cleared back to null (e.g. removing a custom appearance), the tracker restores the originally-captured native value instead of substituting a hardcoded color. - This means M3 apps now correctly fall back to their native theme colors — matching platform conventions — rather than being forced into an unrelated hardcoded palette. ### Issues Fixed Fixes #35126 ### Tested the behaviour in the following platforms - [x] Android - [ ] Windows - [ ] iOS - [ ] Mac ### Output Screenshot Case| Light Theme | Dark Theme | |----------|----------|----------| | **Before**|<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/e8a6cc5f-5101-4d8d-9f0b-b199710b5da8">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/23b6e57c-34fd-48d3-8c92-0b18f2df4ea9">| | **After** |<image width="100" height="200" alt="Image" src="https://github.com/user-attachments/assets/d732e3bc-6a53-4cd8-93a9-c559576d0d5c">|<image width="100" height="200" alt="After Fix" src ="https://github.com/user-attachments/assets/9c6ebe0f-b7ce-4d24-8d76-cad6f25cd785">|
Issue Description
When Material 3 is enabled via true, Android Shell top tabs correctly show the selected state, but the selected indicator color does not match the Material 3 tabs specification.
Root Cause
Android Shell/TabbedPage rendering (
ShellToolbarAppearanceTracker,ShellTabLayoutAppearanceTracker,ShellBottomNavViewAppearanceTracker,TabbedPageManager) fell back to hardcoded default colors whenever a Shell.TabBar*/appearance color property was null.Under Material 3, this hardcoded fallback overrode the native M3 theme's own default colors (colorPrimary, colorOnSurface, etc.), so M3 apps never displayed correct theme colors on the Shell toolbar, top tabs (TabLayout), or bottom navigation (BottomNavigationView) unless every single color was explicitly set.
Description of Change
Shell.TabBar*color is later cleared back to null (e.g. removing a custom appearance), the tracker restores the originally-captured native value instead of substituting a hardcoded color.Issues Fixed
Fixes #35126
Tested the behaviour in the following platforms
Output Screenshot