-
Notifications
You must be signed in to change notification settings - Fork 473
Open
Labels
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
Calling StatusBar.SetColor() causes SafeAreaEdges="Container" to render incorrectly on pages within a TabbedPage on Android API 34 and lower (non-edge-to-edge mode). An extra gap appears between the status bar and page content.
Expected Behavior
All tabs render content correctly with proper safe area insets.
Steps To Reproduce
- Create a
TabbedPagewith multiple tabs - Each tab is a
NavigationPagecontaining aContentPage - Each
ContentPagehasSafeAreaEdges="Container" - Call
StatusBar.SetColor()inApp.OnStart() - Run on Android API 34 (or lower)
Link to public reproduction project repository
https://github.com/DawidBester/TabbedPageSafeAreaGapIssue
Environment
| Component | Version |
|-----------|---------|
| .NET | 10.0 |
| .NET MAUI | 10.0.20 |
| CommunityToolkit.Maui | 13.0.0 |
| Platform | Android API 34 and lower |
| Device | Any Android device/emulator |Anything else?
Additional Context
- ✅ NOT affected: Android API 35/36 (edge-to-edge mode) works correctly
- ✅ NOT affected:
StatusBar.SetStyle()alone does NOT cause this issue - 🔧 Workaround: Use
colorPrimaryDarkin Androidstyles.xmlinstead ofStatusBar.SetColor()
<!-- In Platforms/Android/Resources/values/styles.xml -->
<item name="colorPrimaryDark">#FF005a00</item>