gpt4 book ai didi

状态栏下方的 Android 黑条。它是什么?

转载 作者:搜寻专家 更新时间:2023-11-01 07:45:59 26 4
gpt4 key购买 nike

安卓 7.0安装我的应用程序和 hockeyapp 应用程序后,状态栏下出现奇怪的黑条。它做了什么?如何解决?

enter image description here

最佳答案

听起来您指的是三星 S8 设备。

在您的 list 中的 Application 标签内,尝试为最大纵横比添加元数据。

<application ....
.... >
<meta-data android:name="android.max_aspect" android:value="5.0"/>
....
....
</application>

Most devices have rectangular screens whose width is fairly close to their height, ranging from the 4:3 ratio of a traditional television screen to the now-common 16:9 ratio. However, in some situations an app might run on a device with a more extreme aspect ratio.

An app can declare the maximum aspect ratio it is able to support. If the app runs on a device with a more extreme aspect ratio, the system automatically letterboxes the app, leaving portions of the screen unused so the app can run at its specified maximum aspect ratio.

Samsung S8 具有这些“极端”宽高比之一,因此必须指明您支持它们。为什么这不是默认的,我不知道

如果您的目标是 API 24 及更高版本,您应该能够克服这个问题。否则,请尝试将最大宽高比设置为大于建议的最小值 2.1。

Note: You do not need to set a maximum aspect ratio if an activity's android:resizeableActivity attribute is set to true. If your app targets API level 24 or higher, this attribute defaults to true. For more information, see Configuring your app for multi-window mode

Android documentation about the issue can be found here

关于状态栏下方的 Android 黑条。它是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44197453/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com