supports-screens
在android开发的过程中,不同分辨率的兼容问题是经常遇到的.
如下,
在PAD应用开发的过程中,在PC上模拟器上运行的只是小分辨率的程序,
而对于大小如同1027*768的,可能支持上不是很完美.
除了把图片,布局文件放入不同的文夹中,如(drawable-mdpi, drawable-ldpi, layout-land.....)
对大屏幕的支持还需要以下配置:
<supports-screensandroid:smallScreens=["true" | "false"] android:normalScreens=["true" | "false"] android:largeScreens=["true" | "false"] android:anyDensity=["true" | "false"] />
将以上的配置信息添加到AndroidManifest.xml的<manifest>...</manifest>中.
android 下如果
<manifest
下不写以下的代码
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:anyDensity="true"
/>
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true" />
那么,如果在稍大的设备上调用WindowManager的getDefaultDisplay()方法可能得不到设备的正确的大小;
这里还有两篇官方文档:
1.http://www.gfan.com/dev/android/guide/practices/screens_support.html
2.http://www.gfan.com/dev/android/guide/topics/manifest/supports-screens-element.html#normal
转载于:https://www.cnblogs.com/xingmeng/archive/2012/06/11/2545200.html
supports-screens相关推荐
- Android 2.3 API改变大全(转载)
遇到OOM问题,需要使用VMRuntime类的时候才发现,原来2.3被移除了,想知道它是否有替代类?留下脚印,再继续... Android 2.3 API改变大全 作者: Android开发网原创 时 ...
- 我的Android笔记
--总结: 2种启动Activity方法,4种Activity启动模式,2种启动服务方法,3种handler得到主线程消息队列,5种Activity主动退出,3个 dalvik优点,3中广播,5个 ...
- Supporting Multiple Screens 翻译 支持各种屏幕(上)
Supporting Multiple Screens 支持各种各样的屏幕尺寸.屏幕密度 Android runs on a variety of devices that offer differe ...
- Supporting Multiple Screens(支持Android各种屏幕尺寸)
原文链接 本文翻译自Supporting Multiple Screens. 目前我这篇翻译应该是最全,最完整的官方文档翻译,转载我的翻译请联系本人,标明出处. Supporting Multiple ...
- The listener supports no services
记录一个重启服务器后Oracle启动监听服务报错:The listener supports no services 原因:数据库实例没有注册到listener 解决办法:在listener.ora里 ...
- NVIDIA® TensorRT™ supports different data formats
NVIDIA® TensorRT™ supports different data formats NVIDIA®TensorRT公司™ 支持不同的数据格式.需要考虑两个方面:数据类型和布局. 数据类 ...
- Tensorflow警告:our CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
使用TensorFlow模块时,弹出错误Your CPU supports instructions that this TensorFlow binary was not compiled to u ...
- 去除警告:Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
去除警告:Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 文章 ...
- 成功解决Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2(二)
成功解决Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2(二) ...
- 成功解决Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
成功解决Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2 目录 ...
最新文章
- 将自己可能存放库文件的路径都加入到/etc/ld.so.conf中是明智的选择
- Nest Secure智能保全系统内建麦克风 引发用户反弹
- 阿里云安装Quantaxis
- 计算机电缆静电,ZR-DJFPVP计算机电缆
- 大学计算机基础流媒体,大学计算机基础经典课件.ppt
- Maven项目 整合 tomcat插件== tomcat7:run
- 【UOJ 710】魔塔 OL(贪心)(四毛子分块)
- phpstorm的使用方法
- uni-app ——uni-app的基本使用
- 键盘音效,使得敲代码更加给力
- 思维精进01:罗辑思维2019跨年演讲--小趋势
- UIColor的RGB定义颜色(灰色)
- ipython版本_维护ipython noteb的两个版本
- Centos安装python3并设为默认
- semanticui图标大全
- Couchbase 分享 PPT
- 从实际性能剖析,为什么MEMS激光雷达才是未来主流?
- NV终于出必杀!怪兽显卡GTX TITAN首测
- # 如何获取父节点和子节点
- LeetCode 658、找到 K 个最接近的元素
热门文章
- html新建盒子,html+css 盒子模式展示(备查)
- setinterval 和 ajax,JavaScriptsetInterval和“this”解决方案
- 老版本xcode下载_下载xcode旧版历史版本
- 线程池原理_Java线程池实现原理
- 学生选课系统代码-1start.py代码
- java-idea-3批处理文件运行jar包
- 解释python中的join()和split()函数_python 中join()函数strip() 函数和 split() 函数的详解及实例...
- js默认点击一次_JavaScript初学者,一个小小的点击案例。
- DOM中cloneNode的使用之旅
- Asia Hong Kong Regional Contest 2016