Android的多屏幕支持问题问题、多屏、Android

由网友(弥猫深巷)分享简介:大家好,我一直在开发Android应用程序,应该符合大多数的屏幕分辨率。我只是在设置文件夹绘制此两种分辨率得到了来袭1. 480 * 800与217的近似密度2. 540点¯x960与240的近似密度hi guys i have been developing android app that should matc...

大家好,我一直在开发Android应用程序,应该符合大多数的屏幕分辨率。我只是在设置文件夹绘制此两种分辨率得到了来袭1. 480 * 800与217的近似密度2. 540点¯x960与240的近似密度

hi guys i have been developing android app that should match most of the screen resolutions. And i just got struck at setting the drawable folder for this two resolution 1. 480 x 800 with approximate density of 217 2. 540 x 960 with approximate density of 240

和我有一组不同的两个决议的图像。我将华电国际的540点¯x960,但没有要去了解480x800的也下华电国际属于一个想法。 goggling 后发现了一个绘预选赛称为tvdpi支持进近。 213 密度

And i have a different set of images for both the resolutions and i have set hdpi for 540 x 960 but don't have an idea of going about the 480x800 which also falls under hdpi. After goggling found a drawable qualifier called tvdpi which supports the appr. density of 213

在我的tvdpi预选赛设置为绘制文件夹,我收到无效的资源目录名错误

When i set the tvdpi qualifier to the drawable folder i get "invalid resource directory name" error

推荐答案

分辨率和DPI没有直接的关系。碰巧很多800x480的设备是华电国际,然后可以很容易被低DPI但如果屏幕不够大。

Resolution and dpi are not directly related. It just so happens that many 800x480 devices are HDPI, then can just as easily be low dpi though if the screen is big enough.

如果你确实需要直接的分辨率匹配,您将需要针对API级别13和利用现有的宽度和高度预选赛你的资源,或者如果你需要的目标比13更低的API级别,创建你自己的资源加载方案。

If you really need direct resolution matching you will need to target API level 13 and use available width and height qualifiers for your resources or if you need to target a lower API level than 13, create your own resource loading scheme.

您也可以使用密度和大小限定词的组合,但是仍然留下了一些空间,两个不同的分辨率落入同一个桶。

You can also use a combination of density and size qualifiers but that still leaves some room for two different resolutions falling into the same bucket.

但你挑选之前,你需要问自己你真的想为一块3.7您可绘制相同的像素尺寸为480x800的屏幕480×800屏幕,您为7做的。

But before you pick, you need to ask yourself do you really want the same pixel size for your drawables on a 3.7" 480x800 screen as you do for a 7" 480x800 screen.

阅读全文

相关推荐

最新文章