如何在Android清单文件中定位xxxhdpi设备?

时间:2015-12-17 00:17:54

标签: android android-manifest hdpi

根据Google文档(http://developer.android.com/guide/topics/manifest/compatible-screens-element.html#compatible-screens),我使用template<class X, class Y> struct Closure { X x; Y y; auto operator()(int z) {..}; }; auto foo(int parm) { ... auto f = Closure<decltype(x), decltype(y)&>{x,y}; ... return f(parm); } 标记来定位我的应用的特定屏幕(我只是尝试定位手机)。这是我的表现:

<compatibile screen>

但是,有些设备在Google Play商店中列为不兼容,例如三星Galaxy S6,nexus 5x和nexus 6P。似乎所有具有非常高dpi的设备都不包括在内(xxxdpi)。我如何包含这些手机?

1 个答案:

答案 0 :(得分: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