-
Notifications
You must be signed in to change notification settings - Fork 494
[BUG] Net 9 Android - StatusBar Color overriden on modal pages #2370
Copy link
Copy link
Labels
.NET 9.0All work required to support .NET 9.0All work required to support .NET 9.0bugSomething isn't workingSomething isn't working
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
In MAUI Android, when adding StatusBarBehavior to change the color, and then going to a modal page - the status bar color gets replaced with the colorPrimary color from colors.xml.
This only happens on NET 9. In NET 8 the status bar color remained the same as the previous page.
I think its because int NET 9 in the App.cs you have to create a new Window for the app shell, but is there a solution to the status bar changing?
protected override Window CreateWindow(IActivationState? activationState) { var window = new Window(new AppShell()); return window; }
Expected Behavior
In the modal page, the status bar color should be the same as the previous normal page. This was the behaviour in NET 8
Steps To Reproduce
- Open repo
- Run in NET 9 for Android and click on the button - see the status bar color change from orange to green/red.
- Change to NET 8 - see the color stays orange throughout.
Link to public reproduction project repository
https://github.com/Zack-G-I-T/StatusBarIssue-Net9
Environment
- .NET MAUI CommunityToolkit:
- OS:
- .NET MAUI:Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
.NET 9.0All work required to support .NET 9.0All work required to support .NET 9.0bugSomething isn't workingSomething isn't working