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/06/23 21:04:21 UTC
[PR] revert PR #1902 simplify edge-to-edge preference logic in CordovaActivity and SystemBarPlugin [cordova-android]
GitToTheHub opened a new pull request, #1962:
URL: https://github.com/apache/cordova-android/pull/1962
<!--
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. -->
- Android EdgeToEdge was introduced in Android 15 and should only be used from there on
- Add small comment to the condition
- Enabling this on pre Android 15 would create an issue on Android 7 where content is rendered behind the navigation bar, which should not happen, and results in parts of the page not being visible.
### 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] revert PR #1902 simplify edge-to-edge preference logic in CordovaActivity and SystemBarPlugin [cordova-android]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub closed pull request #1962: revert PR #1902 simplify edge-to-edge preference logic in CordovaActivity and SystemBarPlugin
URL: https://github.com/apache/cordova-android/pull/1962
--
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] revert PR #1902 simplify edge-to-edge preference logic in CordovaActivity and SystemBarPlugin [cordova-android]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on PR #1962:
URL: https://github.com/apache/cordova-android/pull/1962#issuecomment-4789846512
> E2E mode in the behavioural sense is not new ... ever since Android 5 (or 6, whenever Android gave us more control over the status bar) I've been using an "E2E" look 'n' feel by having the status bar an overlay on top of the webview, and using insets to pad content appropriately. So I don't see any reason why we couldn't support E2E mode for pre android 15.
Thanks that you explained everything in detail. I think also to make development for the users not harder as it should be, this should be allowed on older APIs also. Maybe I can use some things you mentioned here for documentation.
--
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] revert PR #1902 simplify edge-to-edge preference logic in CordovaActivity and SystemBarPlugin [cordova-android]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #1962:
URL: https://github.com/apache/cordova-android/pull/1962#issuecomment-4783477768
## [Codecov](https://app.codecov.io/gh/apache/cordova-android/pull/1962?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 61.43%. Comparing base ([`dd3fd35`](https://app.codecov.io/gh/apache/cordova-android/commit/dd3fd3571ecd41e7b81cfb6e05b626413655c732?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`7364984`](https://app.codecov.io/gh/apache/cordova-android/commit/736498490974fa27106a34e7e689a81f8d81cb19?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 #1962 +/- ##
=======================================
Coverage 61.43% 61.43%
=======================================
Files 24 24
Lines 4922 4922
=======================================
Hits 3024 3024
Misses 1898 1898
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/cordova-android/pull/1962?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] revert PR #1902 simplify edge-to-edge preference logic in CordovaActivity and SystemBarPlugin [cordova-android]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on PR #1962:
URL: https://github.com/apache/cordova-android/pull/1962#issuecomment-4790157471
> Android is going to enforce E2E mode on modern API levels and moving forward. Cordova however makes opting into E2E completely optional by recreating the old "system" bars such as the status bar and positioning the webview as it would have on older API levels -- so while the app is technically operating in E2E fashion the webview itself sits within the safe content area and users don't have to worry about refactoring their app to handle safe area insets.
Do you mean, when Android enforces edge-to-edge it is ok to use just cordova-android 15 and let the preference `AndroidEdgeToEdge` to be `false` and Google will not complain about it, when the Android target SDK level requirement is 36?
--
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] revert PR #1902 simplify edge-to-edge preference logic in CordovaActivity and SystemBarPlugin [cordova-android]
Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek commented on PR #1962:
URL: https://github.com/apache/cordova-android/pull/1962#issuecomment-4789733710
Yah I don't agree with reverting PR 1902.
> Enabling this on pre Android 15 would create an issue on Android 7 where content is rendered behind the navigation bar, which should not happen, and results in parts of the page not being visible.
I think this is just a safe area inset issue... when in operating in edge to edge, the developer is going to have to be mindful of screen obstructions and accommodate appropriately.
> But the guide says only that edge-to-edge is a requirement since Android 15 and that it can be anabled on older versions by WindowCompat.enableEdgeToEdge(getWindow())
Android is going to enforce E2E mode on modern API levels and moving forward. So extending on the previous comment. Cordova however makes opting into E2E completely optional by recreating the old "system" bars such as the status bar and positioning the webview as it would have on older API levels -- so while the app is technically operating in E2E fashion the webview itself sits within the safe content area and users don't have to worry about refactoring their app to handle safe area insets.
For users that DO opt into E2E mode, I would expect that would apply to all API levels reasonably possible. That is unless if there is a strong reason **not** support E2E on older devices, we should support it so that app developers can get a consistent behaviour look and feel across API levels. Natively, that is exactly what `WindowCompat.enableEdgeToEdge(getWindow())` does.
E2E mode in the behavioural sense is not new ... ever since Android 5 (or 6, whenever Android gave us more control over the status bar) I've been using an "E2E" look 'n' feel by having the status bar an overlay on top of the webview, and using insets to pad content appropriately. So I don't see any reason why we couldn't support E2E mode for pre android 15.
--
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] revert PR #1902 simplify edge-to-edge preference logic in CordovaActivity and SystemBarPlugin [cordova-android]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on PR #1962:
URL: https://github.com/apache/cordova-android/pull/1962#issuecomment-4790618165
I updated the documentation for `AndroidEdgeToEdge` on PR apache/cordova-docs#1502
--
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] revert PR #1902 simplify edge-to-edge preference logic in CordovaActivity and SystemBarPlugin [cordova-android]
Posted by "seamlink-aalves (via GitHub)" <gi...@apache.org>.
seamlink-aalves commented on PR #1962:
URL: https://github.com/apache/cordova-android/pull/1962#issuecomment-4786814955
This PR makes no sense for me. The definition of edgetoedge is to have the app extend to the full edge of the device. The configuration does not say edgetoedge from android 15. It should apply to all versions of android. It up to the developer of the application to manage the inserts of the app in this case.
The option `window.statusbar.visible = false;` does it hide the status bar. In edge to edge I may want to show the status bar. It is also applies to all versions of android.
--
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] revert PR #1902 simplify edge-to-edge preference logic in CordovaActivity and SystemBarPlugin [cordova-android]
Posted by "seamlink-aalves (via GitHub)" <gi...@apache.org>.
seamlink-aalves commented on PR #1962:
URL: https://github.com/apache/cordova-android/pull/1962#issuecomment-4787026183
Adding to my previous comment, in PR that is being reverted here (#1902), I see that this was motivated by the comment from erisu.
That PR did not just try to re-implement `StatusBarOverlaysWebView` but make EdgeToEdge consistent through all versions of Android.
EdgeToEdge defaults to `false`. If the developer enables it, it should make the necessary changes in the webapp styling.
In my case, with the previous PR and EdgeToEdge enabled the insets are managed in the style of the application in both top and bottom. The style is the same through all version of android.
--
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] revert PR #1902 simplify edge-to-edge preference logic in CordovaActivity and SystemBarPlugin [cordova-android]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on PR #1962:
URL: https://github.com/apache/cordova-android/pull/1962#issuecomment-4787173277
Correctly, this PR is motivated by [erisu's comment|(https://github.com/apache/cordova-android/pull/1902#issuecomment-4288323629) on PR #1902. I looked through the [edge-to-edge guide Android](https://developer.android.com/develop/ui/views/layout/edge-to-edge) and thought there is a preference flag or something introduced by Android 15, which is reflected by the Cordova preference `AndroidEdgeToEdge`. But the guide says only that edge-to-edge is a requirement since Android 15 and that it can be anabled on older versions by `WindowCompat.enableEdgeToEdge(getWindow());`. So if Android gives an example to enable edge-to-edge on previous versions I think it makes sense to give the possibility to enable it on pre Android 15 with `AndroidEdgeToEdge`.
--
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