gpt4 book ai didi

android - 如何在 Android list 文件中定位 xxxhdpi 设备?

转载 作者:太空宇宙 更新时间:2023-11-03 13:51:52 26 4
gpt4 key购买 nike

根据 Google 文档 (http://developer.android.com/guide/topics/manifest/compatible-screens-element.html#compatible-screens),我使用的是 <compatibile screen>标记以针对我的应用程序的特定屏幕(我试图仅针对手机)。这是我的 list :

<compatible-screens>
<!-- all small size screens -->
<screen android:screenSize="small" android:screenDensity="ldpi" />
<screen android:screenSize="small" android:screenDensity="mdpi" />
<screen android:screenSize="small" android:screenDensity="hdpi" />
<screen android:screenSize="small" android:screenDensity="xhdpi" />
<!-- all normal size screens -->
<screen android:screenSize="normal" android:screenDensity="ldpi" />
<screen android:screenSize="normal" android:screenDensity="mdpi" />
<screen android:screenSize="normal" android:screenDensity="hdpi" />
<screen android:screenSize="normal" android:screenDensity="xhdpi" />

<screen android:screenSize="normal" android:screenDensity="420" />
<screen android:screenSize="normal" android:screenDensity="480" />
<screen android:screenSize="normal" android:screenDensity="560" />

</compatible-screens>

但是这样做时,某些设备在 Google Play 商店中被列为不兼容,例如三星 Galaxy S6、nexus 5x 和 nexus 6P。似乎不包括所有具有非常高 dpi 的设备 (xxxdpi)。如何包含这些电话?

最佳答案

使用这种方式可以在manifest文件中定义

<supports-screens android:resizeable=["true"| "false"]
android:smallScreens=["true" | "false"]
android:normalScreens=["true" | "false"]
android:largeScreens=["true" | "false"]
android:xlargeScreens=["true" | "false"]
android:anyDensity=["true" | "false"]
android:requiresSmallestWidthDp="integer"
android:compatibleWidthLimitDp="integer"
android:largestWidthLimitDp="integer"/>

有关更多详细信息,请点击此链接 http://developer.android.com/guide/topics/manifest/supports-screens-element.html

关于android - 如何在 Android list 文件中定位 xxxhdpi 设备?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34324579/

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