CommunityToolkit / CommunityToolkit/Maui

[BUG] Modal navigation overrides custom StatusBar/NavigationBar styles on Android

Open
#2,691 2 comments 2 reactions 0 assignees View on GitHub
bug unverified
Dominant language
C#
Stars
2.7k
Forks
500
Avg merge
2d 14h
Merged PRs (30d)
7

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Did you read the "Reporting a bug" section on Contributing file?

- [x] 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

During modal navigation, any custom styles applied to the StatusBar (e.g., StatusBarBehavior.Color, StatusBarBehavior.Style) or NavigationBar (e.g., NavigationBar.Color, NavigationBar.Style) are forcibly reset to the system defaults.

### Expected Behavior

Custom StatusBar and NavigationBar styles should persist during modal navigation.

### Steps To Reproduce

1. Open and run solution from reproduction repository.
2. Click button to perform modal navigation.

### Link to public reproduction project repository

https://github.com/DooNeGo/modal-systemui-override-demo

### Environment

```markdown
- .NET MAUI CommunityToolkit: 11.2.0
- OS: Android (API 35 and API 31 tested)
- .NET MAUI: 9.0.70
```

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by running the linked modal-systemui-override-demo reproduction with .NET MAUI CommunityToolkit 11.2.0 on Android API 31 or 35 and reproduce the modal navigation. Trace where modal navigation resets StatusBar and NavigationBar styles; done means custom colors and styles persist through modal navigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.