gpt4 book ai didi

android - 如何确保我的应用仅在屏幕尺寸为 7'' + 的设备上运行?

转载 作者:行者123 更新时间:2023-11-29 01:45:17 25 4
gpt4 key购买 nike

我想确保我的应用只能在物理屏幕尺寸至少为 7 英寸的平板电脑上运行。

我读过这个:http://developer.android.com/guide/practices/screens-distribution.html#FilteringTabletApps

我的 AndroidManifest.xml 文件中有以下代码:

<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="13"/>
<supports-screens
android:largeScreens="true"
android:normalScreens="false"
android:requiresSmallestWidthDp="600"
android:smallScreens="false"
android:xlargeScreens="true" />

当我在 Google Play 管理中心查看支持的设备列表时,我看到带有 5.3 英寸屏幕的设备,如 Samsung Galaxy Note仍然列在那里。

有什么方法可以确保我的应用仅在物理屏幕尺寸至少为 7 英寸的设备上运行?

最佳答案

Is there any way to make sure my app only runs on devices with at least 7'' physical screen size?

目前没有。

希望有一天,Play Store 会尊重 android:requiresSmallestWidthDp 作为过滤器。从技术上讲,即使这样也不能处理 7 英寸的对角线,但您可以选择一个 android:requiresSmallestWidthDp 值,该值对于可能的宽高比应该足够大。

关于android - 如何确保我的应用仅在屏幕尺寸为 7'' + 的设备上运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21866771/

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