Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
20f9b4a
Make Android system chrome follow MAUI bar colors
jfversluis May 15, 2026
e152174
Refine Android system bar contrast handling
jfversluis May 18, 2026
ca6479e
Fix Android modal system bar contrast
jfversluis May 18, 2026
1f85509
Update Android legacy system bar chrome
jfversluis May 19, 2026
b2c7210
Fix TabbedPage top chrome update timing during attach lifecycle
Dhivya-SF4094 May 27, 2026
50261eb
Updated WindowExtensions.cs
Dhivya-SF4094 May 27, 2026
4793a80
Fix Android system chrome gradient colors
jfversluis Jun 2, 2026
1fc672d
Fix Android system chrome follow-up
jfversluis Jun 2, 2026
635e61c
Addressed review concern and AI's summary
Dhivya-SF4094 Jun 11, 2026
4944018
Fix Android toolbar icon tint updates
jfversluis Jun 17, 2026
b600feb
Refresh Android toolbar default foreground colors
jfversluis Jun 17, 2026
8c419e6
Handle MaterialShapeDrawable in AppBar color tests
jfversluis Jun 17, 2026
11aa96a
Read AppBar tint in Android chrome tests
jfversluis Jun 18, 2026
9351a7b
Avoid disposed AppBar background state reuse
jfversluis Jun 19, 2026
070663b
Preserve Android system bar foreground for modals
jfversluis Jun 19, 2026
e3c0ce3
Remove AndroidX accessibility revert from chrome PR
jfversluis Jun 21, 2026
4477208
Remove unused Android system bar foreground plumbing
jfversluis Jun 22, 2026
2c3f74b
Address Android chrome review feedback
jfversluis Jun 22, 2026
2ee848d
Add Android system bar opt-out
jfversluis Jul 2, 2026
1ef63ce
Fix Android system chrome opt-out parity
jfversluis Jul 3, 2026
731d010
Address Android system chrome review feedback
jfversluis Jul 8, 2026
d9030c9
Update Android UI test snapshots
jfversluis Jul 15, 2026
7e8108a
Fix Android rebase regressions
jfversluis Aug 3, 2026
efb5346
Finalize Android system chrome opt-in behavior
jfversluis Aug 6, 2026
607caf7
Remove broad Android snapshot refresh
jfversluis Aug 6, 2026
09a533c
Fix initial Android bottom system chrome update
jfversluis Aug 6, 2026
ed2c187
Strengthen initial bottom chrome regression coverage
jfversluis Aug 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,24 @@
Condition="'$(EnableMauiIncrementalHotReload)' != ''"
Value="$(EnableMauiIncrementalHotReload)"
Trim="true" />
<RuntimeHostConfigurationOption Include="Microsoft.Maui.RuntimeFeature.UseMauiAndroidSystemBarBackgrounds"
Condition="'$(MauiAndroidSystemBarsUseMauiChrome)' != ''"
Value="$(MauiAndroidSystemBarsUseMauiChrome)"
Trim="true" />
</ItemGroup>
</Target>

<!--
Workaround for Android SDK bug: Microsoft.Android.Sdk.ILLink.targets uses %(RootMode) without
fully qualifying it as %(TrimmerRootAssembly.RootMode), which causes MSB4096 when user-defined
TrimmerRootAssembly items don't have the RootMode metadata.
See: https://github.com/dotnet/android/issues/10758
-->
<Target Name="_MauiFixTrimmerRootAssemblyMetadata"
BeforeTargets="PrepareForILLink"
Condition="'$(UsingAndroidNETSdk)' == 'true'">
<ItemGroup>
<TrimmerRootAssembly Update="@(TrimmerRootAssembly)" Condition="'%(TrimmerRootAssembly.RootMode)' == ''" RootMode="All" />
</ItemGroup>
</Target>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ public virtual void ResetAppearance(BottomNavigationView bottomView)
bottomView.ItemIconTintList = GetDefaultTabColorList(_shellContext.AndroidContext);
bottomView.ItemTextColor = GetDefaultTabColorList(_shellContext.AndroidContext);
SetBackgroundColor(bottomView, null);
AndroidSystemChrome.UpdateBottomChrome(
bottomView,
new SolidColorBrush(ShellRenderer.DefaultBottomNavigationViewBackgroundColor));
}

public virtual void SetAppearance(BottomNavigationView bottomView, IShellAppearanceElement appearance)
Expand All @@ -68,6 +71,9 @@ public virtual void SetAppearance(BottomNavigationView bottomView, IShellAppeara
bottomView.ItemIconTintList = _itemIconTint;

SetBackgroundColor(bottomView, backgroundColor);
AndroidSystemChrome.UpdateBottomChrome(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🔍 AI-Generated Review (multi-model)

[major] Native Defaults Preservation / default background semantics — When Shell bottom tabs use default colors (controller.EffectiveTabBarBackgroundColor is null, the common case), SetBackgroundColor paints the visible BottomNavigationView with ShellRenderer.DefaultBottomNavigationViewBackgroundColor (lines 88-91), but this call passes null to AndroidSystemChrome.UpdateBottomChrome, which restores the native/theme navigation-bar color instead of matching the visible default bottom-tab color. ResetAppearance (lines 41-47) has the identical issue: SetBackgroundColor(bottomView, null) makes the bar show DefaultBottomNavigationViewBackgroundColor, yet AndroidSystemChrome.UpdateBottomChrome(bottomView, null) never picks up that default. This is the same class of bug already flagged on ShellToolbarAppearanceTracker.cs (explicitly called out there as also needed for bottom tabs) but is unaddressed here, and there is no device test covering default (unstyled) Shell bottom-tab colors against the system navigation bar.

bottomView,
new SolidColorBrush(backgroundColor ?? ShellRenderer.DefaultBottomNavigationViewBackgroundColor));
}

protected virtual void SetBackgroundColor(BottomNavigationView bottomView, Color color)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ protected virtual void SetColors(TabLayout tabLayout, Color foreground, Color ba
tabLayout.SetTabTextColors(unselectedArgb, titleArgb);
tabLayout.SetBackground(new ColorDrawable(background.ToPlatform(ShellRenderer.DefaultBackgroundColor)));
tabLayout.SetSelectedTabIndicatorColor(foreground.ToPlatform(ShellRenderer.DefaultForegroundColor));
AndroidSystemChrome.UpdateTopChrome(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🔍 AI-Generated Review (multi-model)

[major] Native Defaults Preservation / default background semantics — When Shell top tabs use default colors (no explicit Shell.TabBarBackgroundColor, the common case), SetColors paints the visible TabLayout with background.ToPlatform(ShellRenderer.DefaultBackgroundColor) (line 44 — a specific MAUI color such as #2c3e50/#FEF7FF), but this call passes null to AndroidSystemChrome.UpdateTopChrome because background is null. null causes the status bar to be restored to whatever native/theme color it had before MAUI touched it, so it will not match the visibly-colored default tab bar — the exact mismatch this PR sets out to fix. ResetAppearance (lines 19-26) compounds this: it calls SetColors(...ShellRenderer.DefaultBackgroundColor...) (which correctly applies the chrome color) and then immediately calls AndroidSystemChrome.UpdateTopChrome(tabLayout, null) again, discarding the color it just applied. A reviewer already flagged this exact class of bug on ShellToolbarAppearanceTracker.cs and explicitly noted 'the same default-color propagation is needed for top tabs and bottom tabs', but this file (and ShellBottomNavViewAppearanceTracker.cs) still has it. No device test exercises default (non-explicit) Shell top-tab colors against the system status bar.

tabLayout,
new SolidColorBrush(background ?? ShellRenderer.DefaultBackgroundColor));
}

#region IDisposable
Expand All @@ -62,4 +65,4 @@ protected virtual void Dispose(bool disposing)

#endregion IDisposable
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ protected virtual void SetColors(AToolbar toolbar, IShellToolbarTracker toolbarT
shellToolbar.BarTextColor = title ?? ShellRenderer.DefaultTitleColor;
shellToolbar.BarBackground = background ?? new SolidColorBrush(ShellRenderer.DefaultBackgroundColor);
shellToolbar.IconColor = foreground ?? ShellRenderer.DefaultForegroundColor;
AndroidSystemChrome.UpdateTopChrome(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

⚠️ Performance — Both ShellToolbarAppearanceTracker.SetColors (here) and ShellTabLayoutAppearanceTracker.SetColors resolve the same parent AppBarLayout and both call UpdateTopChromeUpdateSystemBarAppearance. On a Shell page with top tabs and a toolbar the status bar is written multiple times per appearance pass, order-dependent (last writer wins).

It's functionally fine today because both compute the same color, but it's fragile if the two ever diverge (e.g. different default handling). Consider driving the shared system-bar chrome once at the owning layer rather than independently from each tracker.

Flagged by: 2/3 reviewers

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🔍 AI-Generated Review (multi-model)

❌ Shell default colors pass null to system chrome on reset/null appearance, even though the toolbar was just set to ShellRenderer.DefaultBackgroundColor. This restores the status bar to the activity default instead of matching the visible Shell app bar for default-colored Shell pages.

toolbar,
background is null ? null : shellToolbar.BarBackground);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🔍 AI-Generated Review (multi-model)

[major] Navigation & Shell — When Shell uses default colors, the visible toolbar is set to ShellRenderer.DefaultBackgroundColor above, but this passes null to system chrome. null restores the original system bar color instead of the visible Shell default, so the Android status bar no longer matches the Shell toolbar on default-colored pages. Pass the effective/defaulted brush here; the same default-color propagation is needed for top tabs and bottom tabs.

}

[Obsolete("Use SetColors(AToolbar, IShellToolbarTracker, Color, Brush, Color) instead.")]
Expand Down Expand Up @@ -85,4 +88,4 @@ protected virtual void Dispose(bool disposing)

#endregion IDisposable
}
}
}
Loading
Loading