ionic-team / ionic-team/ionic-framework

feat: Support new edge-to-edge enforcement introduced in Android 15 (API 35)

未关闭
#30,090 41 条评论 36 个 reaction 已指派 0 人 在 GitHub 查看
triage
主要语言
TypeScript
星标
52.7k
派生
13.3k
平均合并
1 天 15 小时
30 天内合并 PR
51

描述

### Prerequisites

- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already include this feature request, without success.

### Describe the Feature Request

When running an app targeting SDK 35 in an Android 15 device, now the app fills the whole screen (it no longer leaves some margins for the bottom Android buttons for example). This means that some content might be behind the Android buttons, making that content unclickable.

I'm not sure if the best solution is that cordova-android applies margins to the WebView so it doesn't fill the full screen, making it behave similar to how it behaves in Android 14, or it should be Ionic the one handling those margins (I guess using the "safe area"). I'd prefer the latter because it will look similar to a native Android app, that's why I open this issue.

Right now cordova-android only supports SDK 34, it still doesn't support SDK 35.

To reproduce the issue, just add this in your config.xml and run an app in a device with Android 15:

``

For now, this change can be disabled by adding an option in the themes.xml file, but this option is temporary and will be removed in the future:

`true`

More information about this change:

https://developer.android.com/develop/ui/views/layout/edge-to-edge
https://developer.android.com/about/versions/15/behavior-changes-15#edge-to-edge

### Describe the Use Case

The new edge-to-edge display should be supported, otherwise some content can become unclickable because it's behind the Android buttons.

### Describe Preferred Solution

I guess the easiest solution is to handle this case using the "safe area".

### Describe Alternatives

_No response_

### Related Code

_No response_

### Additional Information

_No response_

贡献指南

打开贡献指南

调研方向

Reproduce the issue with android-targetSdkVersion set to 35 in config.xml on an Android 15 device, then review themes.xml and the linked Android edge-to-edge documentation. Determine whether the change belongs in the Android integration or Ionic safe-area handling; done means content remains usable around the Android system buttons without relying on the temporary opt-out setting.

由索引模型根据 Issue 内容生成。

评估

技术栈
android
领域
mobile-dev
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。