Description
Is there an existing issue for this?
- I have searched the existing issues
Did you read the "Reporting a bug" section on Contributing file?
- I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
Current Behavior
The attached one-page sample program initially shows an edge-to-edge page with a transparent status bar. This all seems to work correctly and you see this:
Then tap the button to change the status bar color. On Android 36 here's what you see:
We're still in edge-to-edge but the green background has obscured the top of the page, which is what I'd expect. Then we switch to a transparent
background and see this:
The green status bar area has not gone away, so neither the red background not the text at the top of the page shows. The test program cycles through a couple more colors, but the result is the same.
On Android 34 setting a non-transparent status bar color cancels edge-to-edge until you set a transparent color and then edge to edge is restored., which still seems wrong, but wrong in a different way (in that it cancels, or at least suspends, edge-to-edge)
Expected Behavior
When a transparent status bar background color is restored the top part of the page should become visible again. Whether or not a transparent status bar is set should have no effect on edge-to-edge.
Steps To Reproduce
- Open and run the solution from the repository (on Android 36)
- Tap the button and observe the behavior.
Link to public reproduction project repository
https://github.com/david-maw/StatusBarTransparent.git
Environment
- .NET MAUI CommunityToolkit:14.0
- OS: Android 34 and 36
- .NET MAUI:10.0.40Anything else?
I can work around this, so for me it's not especially urgent.
Activity
IgrisModz commentedon Mar 5, 2026
I investigated this issue and found the root cause.
Problem
In StatusBar.android.cs (line 49-61), the overlay is created but never assigned a tag:
Since statusBarOverlay.Tag is never set, FindViewWithTag("StatusBarOverlay") always returns null, causing a new overlay to be stacked on top every time StatusBar.SetColor() is called.
This explains the behavior in your reproduction: the green overlay is never removed/updated, it just gets a new overlay stacked on top of it.
Comparison with NavigationBar
NavigationBar.android.cs (line 109) correctly sets the tag:
Fix
Add one line after creating the StatusBar overlay:
Workaround
Until this is fixed, you can find all StatusBar overlays by their layout characteristics (Gravity.Top + height = status_bar_height + 3) instead of using FindViewWithTag.
I implemented this workaround for my fullscreen service: FullscreenService.cs