res/drawable-xhdpi文件夹下的资源文件无法应用程序无法识别
来源:互联网 发布:新西兰网络 编辑:程序博客网 时间:2024/06/05 02:09
转自:http://blog.csdn.net/woshicaixianfeng/article/details/6927155
项目要做平板支持 (Motorola Xoom 3.0),客户要求使用高分辨率图片。
Motorola Xoom 的 resolution 是 1280X800
因为:
- xlarge screens are at least 960dp x 720dp
- large screens are at least 640dp x 480dp
- normal screens are at least 470dp x 320dp
- small screens are at least 426dp x 320dp
布局文件是找到了,可是密度density方面,显示我的Tablet没有找到 res/drawable-xhdpi ,唯一的解释是这个Tablet密度 density不是 xhdpi的(320)。
参考:
ldpi
Resources for low-density (ldpi) screens (~120dpi).mdpi
Resources for medium-density (mdpi) screens (~160dpi). (This is the baselinedensity.)hdpi
Resources for high-density (hdpi) screens (~240dpi).xhdpi
Resources for extra high-density (xhdpi) screens (~320dpi).nodpi
Resources for all densities. These are density-independent resources. The system does notscale resources tagged with this qualifier, regardless of the current screen's density.tvdpi
Resources for screens somewhere between mdpi and hdpi; approximately 213dpi. This is notconsidered a "primary" density group. It is mostly intended for televisions and most apps shouldn'tneed it—providing mdpi and hdpi resources is sufficient for most apps and the system willscale them as appropriate. If you find it necessary to provide tvdpi resources, you should size themat a factor of 1.33*mdpi. For example, a 100px x 100px image for mdpi screens should be 133px x133px for tvdpi.那么,如何得知我平板的屏幕显示密度呢?
知道屏幕的尺寸、分辨率,怎样计算它的像素密度?
答案:分辨率的平方和开根号,除以屏幕尺寸(平时所说的几英寸都是只斜对角线长度)。计算出的结果,差不是 149.449,原来不是 ~320dpi,差不多 ~150dpi,这也就解释了,为什么我放在xhdpi资源文件夹下的图片资源都没有被识别到!注:dpi是“dot per inch”的缩写,每英寸像素数。1英寸 = 2.54 厘米-------------------------------------------------------------------总结: 显示效果的好坏,与分辨率 和 密码的大小有关,我的平板只有 ~150dpi,虽然它有1280X800的resolution.但还是显示的比较模糊,山寨感较强。而我的手机(htc desire G7),显示效果特别华丽,因为它的屏幕只有3.7inch,而resolution为800X480,计算出的dpi是 252.149,所以显示得比较清晰。 当运行app时,Motorola Xoom使用默认drawable-mdpi资源文件夹下的资源图片,而htc g7则使用drawable-hdpi资源文件夹下的图片。
- res/drawable-xhdpi文件夹下的资源文件无法应用程序无法识别
- res/drawable-xhdpi文件夹下的资源文件无法应用程序无法识别
- android如何获取res文件夹下drawable文件夹下的图片资源文件转成一个BitMap对象
- 资源文件夹res/drawable-nodpi的使用
- trade文件夹下,新建的文件,git无法识别----解决方法
- android res目录下drawable、drawable-ldpi、drawable-mdpi、drawable-hdpi、drawable-xhdpi、drawable-xxhdpi的使用方法
- 资源文件无法识别
- res下drawable文件
- android之res目录下的drawable(ldpi、mdpi、hdpi、xhdpi、xxhdpi)
- layout-land资源文件夹无法识别
- android应用程序下res文件夹的介绍
- Android res下三个drawable文件夹的用途
- ANDROID RES下三个DRAWABLE文件夹的用途
- -----------------res里面的drawable(ldpi、mdpi、hdpi、xhdpi、xxhdpi)
- res里面的drawable(ldpi、mdpi、hdpi、xhdpi、xxhdpi) 区别
- res里面的drawable(ldpi、mdpi、hdpi、xhdpi、xxhdpi)
- res里面的drawable(ldpi、mdpi、hdpi、xhdpi、xxhdpi)
- res里面的drawable(ldpi、mdpi、hdpi、xhdpi、xxhdpi)
- 将一个对话框直接贴到另一个对话框上
- 学习新技术的 10 个建议
- 黑马程序员-JAVASE入门(组成部分2语句和函数)
- 字符编码笔记:ASCII,Unicode和UTF-8
- android之alertDialog
- res/drawable-xhdpi文件夹下的资源文件无法应用程序无法识别
- oracle中date类型!!!
- appStore 状态列表
- VS2008使用命令行选项查看对象的内存布局
- ..\TestApp does not exist or is not a readable directory
- IOS5 ARC unsafe_unretained等说明
- 解说百度不同IP段蜘蛛代表的意思
- 希腊字母表及其读音与意义
- MC新手入门(三十)------ 逻辑运算符和表达式