You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "GitToTheHub (via GitHub)" <gi...@apache.org> on 2026/08/07 12:33:29 UTC

[PR] fix(statusbar): restore `StatusBarOverlaysWebView` support in non-edge-to-edge mode [cordova-android]

GitToTheHub opened a new pull request, #1991:
URL: https://github.com/apache/cordova-android/pull/1991

   <!--
   Please make sure the checklist boxes are all checked before submitting the PR. The checklist is intended as a quick reference, for complete details please see our Contributor Guidelines:
   
   http://cordova.apache.org/contribute/contribute_guidelines.html
   
   Thanks!
   -->
   
   ### Platforms affected
   
   
   
   ### Motivation and Context
   <!-- Why is this change required? What problem does it solve? -->
   <!-- If it fixes an open issue, please link to the issue here. -->
   
   - When using the plugin `cordova-plugin-statusbar` with `cordova-android@14.0.1`, the status bar overlays the web view by default and a translucent color can be set. Also the setting can be controlled by the preference `StatusBarOverlaysWebView` in `config.xml`. This PR restores the behaviour. `StatusBarOverlaysWebView ` will be only applied, when the status bar plugin is added or the app is not in edge-to-edge mode
   
   ## Sample
   
   Configuration:
   
   - Add cordova-plugin-statusbar
   - Set `<preference name="StatusBarBackgroundColor" value="#22ff0000" />` in `config.xml`
    - Test on Android 10 Emulator
   
   | cordova-android 14.0.1 | cordova-android 15.1.0 |
   | --- | --- |
   | <img width="400" src="https://github.com/user-attachments/assets/651f839f-8823-43ce-b5eb-bb2c24d261f1" /> |  <img width="400" src="https://github.com/user-attachments/assets/987eb52a-c02f-4b11-b925-6c18425ee7b4" /> |
   
   Restored behaviour in this PR:
   
   <img width="400" src="https://github.com/user-attachments/assets/a670757e-ea2d-42cd-98d0-54894f4fccfb" />
   
   
   ### Description
   <!-- Describe your changes in detail -->
   
   
   
   ### Testing
   <!-- Please describe in detail how you tested your changes. -->
   
   
   
   ### 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](https://help.github.com/articles/closing-issues-using-keywords/))
   - [ ] I've updated the documentation if necessary
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [PR] fix(statusbar): restore `StatusBarOverlaysWebView` support in non-edge-to-edge mode [cordova-android]

Posted by "dpogue (via GitHub)" <gi...@apache.org>.
dpogue commented on PR #1991:
URL: https://github.com/apache/cordova-android/pull/1991#issuecomment-5220804122

   As previously mentioned, this should really be controlled by `<meta name="viewport" content="viewport-fit=contain">` or `<meta name="viewport" content="viewport-fit=cover">` in the HTML content rather than through config.xml, to match behaviour on iOS.
   
   Currently, the Android WebView doesn't expose the viewport-fit value to us, so what we'd need to do is set up a MutationObserver in JavaScript to observe the value and toggle things in platform code using an internal API.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [PR] fix(statusbar): restore `StatusBarOverlaysWebView` support in non-edge-to-edge mode [cordova-android]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #1991:
URL: https://github.com/apache/cordova-android/pull/1991#issuecomment-5217123216

   ## [Codecov](https://app.codecov.io/gh/apache/cordova-android/pull/1991?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 63.20%. Comparing base ([`919cd76`](https://app.codecov.io/gh/apache/cordova-android/commit/919cd76cd61ee2c5b67a261cd273c1cbb4dd1a21?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`35a56ab`](https://app.codecov.io/gh/apache/cordova-android/commit/35a56abe8b9518e53eaaf3c0dff8923fffcfb178?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@           Coverage Diff           @@
   ##           master    #1991   +/-   ##
   =======================================
     Coverage   63.20%   63.20%           
   =======================================
     Files          24       24           
     Lines        4922     4922           
   =======================================
     Hits         3111     3111           
     Misses       1811     1811           
   ```
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/cordova-android/pull/1991?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [PR] fix(statusbar): restore `StatusBarOverlaysWebView` support in non-edge-to-edge mode [cordova-android]

Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on PR #1991:
URL: https://github.com/apache/cordova-android/pull/1991#issuecomment-5237974730

   > As previously mentioned, this should really be controlled by <meta name="viewport" content="viewport-fit=contain"> or <meta name="viewport" content="viewport-fit=cover"> in the HTML content rather than through config.xml, to match behaviour on iOS.
   
   I understand. But since we support for iOS the config.xml preference `StatusBarBackgroundColor` and the html meta `theme-color`, we could support `StatusBarOverlaysWebView` as a workaround for Android since `viewport-fit=cover` and `viewport-fit=cover` is not supported currently by Android. For iOS the plugin documentation of cordova-plugin-statusbat already states that [`viewport-fit=cover` is needed](https://github.com/apache/cordova-plugin-statusbar#ios-quirks) to let the status bar overlay the web view, so there is no code change needed for cordova-ios.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [PR] fix(statusbar): restore `StatusBarOverlaysWebView` support in non-edge-to-edge mode [cordova-android]

Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on PR #1991:
URL: https://github.com/apache/cordova-android/pull/1991#issuecomment-5225957903

   I try to understand something about the status bar.
   
   When I set `StatusBarOverlaysWebView` to `true` on iOS and set a translucent background color to the status bar e.g. `<preference name="StatusBarBackgroundColor" value="#22ff0000" />`, the status bar background color is not applied when plugin cordova-plugin-statusbar is installed. Is this a bug? The readme says:
   
   > If StatusBarOverlaysWebView is set to true, then a 8 digit hex (#AARRGGBB) string can optionally be used to define the transparency.
   
   This is the same behaviour without the plugin when `viewport-fit=cover` is set. When I remove `viewport-fit=cover` the status bar overlays the web view, the translucent background color is applied and the web content is visible behind the status bar.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org