android-Distributing to Specific Screens
2015-12-26 01:15
483 查看
Although we recommend that you design your application to function properly on multiple configurations of screen size and density, you can instead choose to limit the distribution
of your application to certain types of screens, such as only tablets and other large devices or only handsets and similar-sized devices.
Here's what the manifest entry looks like if your application is compatible with only small and normal screen sizes:
Caution: If you use the
for the reverse scenario (when your application is not compatible with larger screens)
and set the larger screen size attributes to
not apply filtering. Your application will still be available to larger screens, but when it runs, it will not resize to fit the screen. Instead, the system will emulate a
handset screen size (about 320dp x 480dp; see Screen
Compatibility Mode for more information). If you want to prevent your application from being downloaded on larger screens, use
as discussed in the previous section about Declaring
an App is Only for Handsets.
>Although we recommend that you publish one APK for your application, Google Play allows you to publish
multiple APKs for the same application when each APK supports a different set of screen configurations (as declared in the manifest file).
If you need more information about how to publish multiple APKs on Google Play, read Multiple
APK Support.
of your application to certain types of screens, such as only tablets and other large devices or only handsets and similar-sized devices.
Here's what the manifest entry looks like if your application is compatible with only small and normal screen sizes:
<manifest ... > <compatible-screens> <!-- all small size screens --> <screen android:screenSize="small" android:screenDensity="ldpi" /> <screen android:screenSize="small" android:screenDensity="mdpi" /> <screen android:screenSize="small" android:screenDensity="hdpi" /> <screen android:screenSize="small" android:screenDensity="xhdpi" /> <!-- all normal size screens --> <screen android:screenSize="normal" android:screenDensity="ldpi" /> <screen android:screenSize="normal" android:screenDensity="mdpi" /> <screen android:screenSize="normal" android:screenDensity="hdpi" /> <screen android:screenSize="normal" android:screenDensity="xhdpi" /> </compatible-screens> ... <application ... > ... <application> </manifest>
<manifest ... > <supports-screens android:smallScreens="false" android:normalScreens="false" android:largeScreens="true" android:xlargeScreens="true" android:requiresSmallestWidthDp="600" /> ... <application ... > ... </application> </manifest>
Caution: If you use the
<supports-screens>element
for the reverse scenario (when your application is not compatible with larger screens)
and set the larger screen size attributes to
"false", then external services such as Google Play do
not apply filtering. Your application will still be available to larger screens, but when it runs, it will not resize to fit the screen. Instead, the system will emulate a
handset screen size (about 320dp x 480dp; see Screen
Compatibility Mode for more information). If you want to prevent your application from being downloaded on larger screens, use
<compatible-screens>,
as discussed in the previous section about Declaring
an App is Only for Handsets.
>Although we recommend that you publish one APK for your application, Google Play allows you to publish
multiple APKs for the same application when each APK supports a different set of screen configurations (as declared in the manifest file).
If you need more information about how to publish multiple APKs on Google Play, read Multiple
APK Support.
相关文章推荐
- Android Reverse Engineering 101 – Part 1
- 10.Android之ProgressDialog进度对话框学习
- Android App打包自动生成版本号Versin Name与Version Code方法之完美方案
- 【Android】《第一行代码—Android》第四章总结
- android 图片二次采样,质量压缩,LruCache缓存
- Android Studio设置内存大小
- Android时间选择器TimePicker和数字选择器NumberPicker和TimePickerDialog
- Mac OS X 10.10.3下android-5.1.1_r9 源码下载与编译
- Android之原生动作
- Android 打电话,发短信,调用系统浏览器
- Eclipse for android 实现代码自动提示智能提示功能
- Android Fragment全解析+Fragment与Activity通信
- Android动画使用方式详解
- Intent 和Intent-filter
- Android ListView观察者模式浅析
- LogHtml-Android本地日志工具
- Apktool反编译工具的使用
- android findviewByid()关于空指针
- android View的事件体系
- android adt中R程序丢失