开发者

Restrict density in API 7

开发者 https://www.devze.com 2023-04-08 18:22 出处:网络
How can I restrict densit开发者_运维知识库y in Manifest in early version than API 9. As I know since this API there is a tag

How can I restrict densit开发者_运维知识库y in Manifest in early version than API 9. As I know since this API there is a tag

<compatible-screens>
    <screen android:screenSize=["small" | "normal" | "large" | "xlarge"]
            android:screenDensity=["ldpi" | "mdpi" | "hdpi" | "xhdpi"] />
    ...
</compatible-screens>

But in early versions I can only restrict screen size with

<supports-screens android:smallScreens="false"
    android:normalScreens="true" android:largeScreens="true"
    />

Thanks in advance,


You can simple set your target SDK version to 9, and minSDK version to whatever you want. This way the density will be restricted on devices with API version 9 and higher, and on devices with API version lower than 9 only the screen size parameter will be checked. AFAIK, there's no other way to resolve this problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号