Skip to content

feat(android): add StatusBarBackgroundColor preference to config.xml, update BackgroundColor regarding Android#1502

Open
GitToTheHub wants to merge 6 commits into
masterfrom
pr-feat-config.xml-add-StatusBarBackgroundColor-update-BackgroundColor
Open

feat(android): add StatusBarBackgroundColor preference to config.xml, update BackgroundColor regarding Android#1502
GitToTheHub wants to merge 6 commits into
masterfrom
pr-feat-config.xml-add-StatusBarBackgroundColor-update-BackgroundColor

Conversation

@GitToTheHub
Copy link
Copy Markdown
Contributor

@GitToTheHub GitToTheHub commented May 21, 2026

Platforms affected

  • Android

Motivation and Context

  • StatusBarBackgroundColor is handled since cordova-android 15, which is reused from cordova-plugin-statusbar. WhenAndroidEdgeToEdge is true, this preference may not produce a visible status bar background fill, but it can still influence status bar icon/text light-versus-dark appearance.
  • Add prefernce example ofStatusBarBackgroundColor
  • Update documentation of BackgroundColor that on Android if StatusBarBackgroundColor is not set, this value is also used for the status bar. Depending on the Android OS version, this preference may also change the navigation/gesture bar. When AndroidEdgeToEdge is true, this preference may not produce a visible status bar background fill, but it can still influence status bar icon/text light-versus-dark appearance. If the value is invalid, Cordova ignores it and falls back to platform defaults/fallback colors.
  • Add note to AndroidEdgeToEdge, that when using cordova-android 15 and the preference is set, the built-in StatusBar JavaScript API methods (such as window.statusbar.setBackgroundColor) are not applied.
  • Generated-By: GPT-5.3-Codex

Description

Testing

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

…ml`, update `BackgroundColor` regarding Android

- `StatusBarBackgroundColor` is handled since cordova-android 15, which is reused from cordova-plugin-statusbar. When`AndroidEdgeToEdge` is `true`, this preference may not produce a visible status bar background fill, but it can still influence status bar icon/text light-versus-dark appearance.
- Add prefernce example of`StatusBarBackgroundColor`
- Update documentation of `BackgroundColor` that on Android if `StatusBarBackgroundColor` is not set, this value is also used for the status bar. Depending on the Android OS version, this preference may also change the navigation/gesture bar. Edge case: if the value is invalid, Cordova ignores it and falls back to platform defaults/fallback colors.
- Add note to AndroidEdgeToEdge, that when it set the built-in StatusBar JavaScript API methods (such as `window.statusbar.setBackgroundColor`) are not applied.
- Generated-By: GPT-5.3-Codex
- Edge case: when `AndroidEdgeToEdge` is `true`, this preference may not produce a visible status bar background fill, but it can still influence status bar icon/text light-versus-dark appearance.
- Generated-By: GPT-5.3-Codex
Copy link
Copy Markdown
Member

@dpogue dpogue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bunch of what you've written for Android also applies in cordova-ios 8.x

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants