-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Android 15 enforces edge-to-edge #7804
Comments
This plugin might help: https://github.com/capacitor-community/safe-area |
Yes I've seen it, but it should work without it |
This is the same issue as #6423, except on Android 13 edge to edge was opt-in while on Android 15 it becomes opt-out, but it is the same issue nonetheless. And since the only way to opt-out on Android 15 is getting immediately deprecated, there really should be a 1st party solution, otherwise capacitor will become quite literally unusable without using 3rd party plugins (or writing one yourself) once the opt-out is removed, and that's not a great place to be at. To be honest this is actually something Google should fix. The way safe areas are supposed to be handled on web is via standard CSS One option to get it working for now is something like the aforementioned @capacitor-community/safe-area (though there are some issues with that one that I've opened a PR for, so I don't consider it a solution just yet, but it's close) which solves this by adding the insets via Another, albeit temporary, alternative is to restore the previous behaviour with <application
android:windowOptOutEdgeToEdgeEnforcement="true"
...>
...
</application> |
I have the same issue and nothing works for me, unable to update to capacitor 7 until official support for edge-to-edge is added |
Please let us know if there are any plans to address this in Capacitor. For now, we can either opt out or use @capacitor-community/safe-area. I have tested both options, and they both worked. |
I have the same problem. With Capacitor 6 the setting |
same here |
In the addition to MainActivity, the "setSystemUiVisibility" is deprecated? |
@mla03 you're right, I didn't notice that. I don't spend enough time in Android Studio! I updated my code with this method for newer API levels and it has the same effect.
|
@pjamessteven great. I've tried it, together with the I set the margins of the footer and header in my global.scss: ion-footer { Still not perfect. Below screenshot from my Google Pixel 7. I still think that it's something for Ionic/Capacitor to fix, since reading the documentation for their ion-footer/ion-header states: |
Like with the navigation bar, you also need to set the menu bar to overlay
the web view when using safe areas. I can’t remember how I achieved this,
on mobile right now.
…On Tue, 4 Feb 2025 at 7:47 PM, mla03 ***@***.***> wrote:
@pjamessteven <https://github.com/pjamessteven> great. I've tried it,
together with the capacitor-community/safe-area.
I set the margins of the footer and header in my global.scss:
`ion-header {
margin-top: var(--safe-area-inset-top, 0px);
}
ion-footer {
margin-bottom: var(--safe-area-inset-bottom, 0px);
}`
Still not perfect.
image.png (view on web)
<https://github.com/user-attachments/assets/c9ae75e3-68a1-49f9-91c3-261bcf0dada4>
I still think that it's something for Ionic/Capacitor to fix, since
reading the documentation for their ion-footer/ion-header states:
"*When a toolbar is used inside of a footer/header, the content will be
adjusted so it is sized correctly, and the footer/header will account for
any device safe areas.*"
https://ionicframework.com/docs/api/header
https://ionicframework.com/docs/api/footer
—
Reply to this email directly, view it on GitHub
<#7804 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AES7C2CEHZHG4O4SAVKQSGT2OBPBBAVCNFSM6AAAAABTUTPZOOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZTGAZDANJUHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Capacitor Version
Latest Dependencies:
@capacitor/cli: 6.2.0
@capacitor/core: 6.2.0
@capacitor/android: 6.2.0
@capacitor/ios: 6.2.0
Installed Dependencies:
@capacitor/cli: 6.2.0
@capacitor/core: 6.2.0
@capacitor/android: 6.2.0
@capacitor/ios: 6.2.0
[success] iOS looking great! 👌
[success] Android looking great! 👌
Other API Details
No response
Platforms Affected
Current Behavior
In Android 15 the navigation bar overlaps the app. My users a reporting it wako-app/wako#121
This seems to be different to #6423, that's why I open a new issue.
Expected Behavior
The navigation bars shouldn't overlap
Project Reproduction
Additional Information
No response
The text was updated successfully, but these errors were encountered: