限制密度API 7 [英] Restrict density in API 7

查看:199
本文介绍了限制密度API 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么能限制密度表现在早期版本比API 9.据我所知,因为这API还有一个标签

How can I restrict density 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"
    />

由于提前,

推荐答案

您可以简单的设置你的目标SDK 版本9,和 minSDK 版本,以任何你想要的。这样的密度将在设备上用的API版本9和更高的限制,并在与API版本低于9的设备仅在屏幕尺寸的参数将被检查。据我所知,有解决这个问题没有别的办法。

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.

这篇关于限制密度API 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆