Skip to content

[BUG] Using StatusBarBehavior Breaks StatusBar.SetColor() #3197

Description

@david-maw

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 CommunityToolkit.Maui.Core.Platform.StatusBar.SetColor() to set a new color does not seem to work after a StatusBarBehavior has been invoked on a previous page, though setting the "Transparent" color does something.

Expected Behavior

StatusBar.SetColor should select a new color.

Steps To Reproduce

  1. Open and run the application from the repository.
  2. Wait 5 seconds for this page to show:
Image
  1. Click the button to change colors and note that only "Transparent" seems to have an effect.
  2. Fall back to 10.0.1 toolkit and try again - it'll work better there (though will exhibit a different bug which is fixed in 10.1.0)

Link to public reproduction project repository

https://github.com/david-maw/DivStart-StatusBarStuck.git

Environment

- .NET MAUI CommunityToolkit: 10.1.0
- OS: Android 36
- .NET MAUI: 10.0.5

Anything else?

For me the workaround of not using StatusBarBehavior was feasible, so this isn't important.

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