Skip to content

[Bug] StatusBar.SetColor() breaks SafeAreaEdges rendering on TabbedPage (Android API ≤34) #3025

Description

@DawidBester

Is there an existing issue for this?

  • I have searched the existing issues

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

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

  1. Create a TabbedPage with multiple tabs
  2. Each tab is a NavigationPage containing a ContentPage
  3. Each ContentPage has SafeAreaEdges="Container"
  4. Call StatusBar.SetColor() in App.OnStart()
  5. 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 colorPrimaryDark in Android styles.xml instead of StatusBar.SetColor()
<!-- In Platforms/Android/Resources/values/styles.xml -->
<item name="colorPrimaryDark">#FF005a00</item>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions