3

根据谷歌文档(http://developer.android.com/guide/topics/manifest/compatible-screens-element.html#compatible-screens)我正在使用<compatibile screen>标签来定位我的应用程序的特定屏幕(我正在尝试仅针对手机)。这是我的清单:

<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)。我如何包含这些手机?

4

1 回答 1

3

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

<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

于 2015-12-17T00:27:02.517 回答