限制密度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.