限制Android应用程序的某些屏幕 [英] Restricting Android Application to Certain Screens
问题描述
我正在开发一个动态壁纸,要求屏幕必须的某些功能。
I'm developing a Live Wallpaper that requires the screen to be of certain features.
动态壁纸应该支持的API 7级及以上(思想我不知道它会工作在蜂窝)和正常
屏幕尺寸中
密度,这仅限于 HVGA(小320x480)
, WVGA800(480×800)
, WVGA854(为480x854)
The Live Wallpaper should support API level 7 and above (Thought I'm not sure it'll work on Honeycomb) and Normal
screen size with Medium
density which are restricted to HVGA(320x480)
, WVGA800(480x800)
, WVGA854(480x854)
我能够把它限制在正常
在支持屏
屏幕尺寸> AndroidManifest.xml中:
I am able to restrict it to Normal
screen size using support-screens
in the AndroidManifest.xml
:
<support-screens
android:smallScreens="false"
android:normalScreens="true"
android:largeScreens="false" />
不过,我不知道如何将其限制在中
密度显示屏。
什么是实现这一目标的最佳途径?因为我不想壁纸出现在市场上的设备无法运行。
What is the best way to achieve this? as I don't want the wallpaper to appear in the Market for devices that could not run it.
感谢
推荐答案
您可以指定<一个href="http://developer.android.com/guide/topics/manifest/compatible-screens-element.html"><$c$c><compatible-screens>$c$c>在清单文件,以及市场不会显示你的应用程序的屏幕这是从你列为兼容的有所不同。
You can specify <compatible-screens>
in the manifest file, and the Market will not display your application for screens which are different from the ones you've listed as compatible.
<compatible-screens>
<screen android:screenSize="normal" android:screenDensity="mdpi" />
</compatible-screens>
这篇关于限制Android应用程序的某些屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!