android全面屏系统哪个版本开始,Android全面屏

博客介绍全面屏手机是屏幕纵横比大于1.86的设备。指出应用针对Android 8.0(API级别26)或更高版本会填充整个屏幕,7.1及以下会限制界面大小。谷歌建议若布局无法适应大纵横比,可设最大纵横比。还提醒设置时相关属性,最好将应用升级到最新版本,但UI适配仍需完善。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

所谓全面屏手机,就是屏幕纵横比大于1.86的设备。例如:

437bda490e5d?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation

举个例子.png

官方文档:

If your app targets Android 8.0 (API level 26) or higher, it fills the entire screen, according to its layout.

If your app targets Android 7.1 (API level 25) or lower, the system limits the size of the app's interface to a window with an aspect ratio of 16:9 (approximately 1.86). If the app runs on a device with a larger screen aspect ratio, the app appears in a 16:9 letterbox that leaves part of the screen unused.

大致翻译:

如果应用针对的是Android 8.0(API级别26)或更高版本,则会根据其布局填充整个屏幕。

如果您的应用面向Android 7.1(API级别25)或更低,系统会将应用界面的大小限制为纵横比为16:9(约1.86)的窗口。如果应用程序在较大屏幕纵横比的设备上运行,则该应用程序将显示在16:9区域中,使得部分屏幕未使用。

当应用未适配全面屏时,就会出现问题。

因此,谷歌官方建议:

If your app layout cannot adapt to arbitrarily large aspect ratios, you can explicitly enforce letterboxing on all Android OS levels by setting a maximum aspect ratio. We recommend a ratio of 2.4 (12:5).

如果app布局无法适应任意大的纵横比,则可以通过设置最大纵横比来强制显示。建议比率为2.4(12:5)。

Android 8.0 (API level 26) 或更高

...

Android 7.1及以下

Tips : 如果设置最大纵横比,请不要忘记也设置 android:resizeableActivity = false。否则,最大纵横比无效。(resizeableActivity默认为false,该属性也会支持分屏显示)

个人总结

最好的做法就是将应用升级到最新版本(目前是28),这样就能自动适配全屏;但是并不意味着UI能够正常显示,UI适配仍是开发和设计需要完善的问题。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值