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

标签 android statusbar

安卓 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/

相关文章:

android - Xamarin Android ActionBar 选项卡 - 1 个选项卡不显示文本

Android - 自定义进度条以显示当前播放的秒数

android - 如何使用 Android android.provider.MediaStore.ACTION_IMAGE_CAPTURE 拍摄多张照片?

iphone - 为什么在 Default.png 期间状态栏仍然显示?

ios - 半透明状态栏 (iPhone/iPad/iPod Touch)

Android 退出后隐藏状态栏

java - Android:滚动包含recyclerView的 subview 时如何滚动parentView

android - 如何在Android中获取当前的sqlite数据库大小或包大小?

swift - iOS 9 : Determine size of collection view in portrait and landscape

ios - 状态栏在 iOS 6 上消失了