Android的布局,图形和分辨率,什么是最好的办法吗? [英] Android layouts, drawables, and resolution, what is the best way?

查看:88
本文介绍了Android的布局,图形和分辨率,什么是最好的办法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我倒要发展到屏幕分辨率:

I d like to develop to screen resolutions:

854 * 480
800 * 480
480 * 320

854*480 800*480 480*320

什么是正确/ RES结构呢?

what is the correct /res structure for this?

#1
drawable-854x480
drawable-800x480
drawable-480x320

layout-854x480
layout-800x480
layout-480x320

or

#2
drawable-hdpi-854x480
drawable-hdpi-800x480
drawable-mdpi-480x320

layout-hdpi-854x480
layout-hdpi-800x480
layout-mdpi-480x320

or

#3
drawable-hdpi-long
drawable-hdpi-notlong
drawable-mdpi

layout-hdpi-long
layout-hdpi-notlong
layout-mdpi

要不?

我完全糊涂了,因为银河系不使用800×480目录下,为什么呢?我想的Galaxy S I9000是一块3.7英寸,800 * 480的设备。

i am totally confused, because Galaxy S not use the "800x480" directory, why? I think Galaxy S i9000 is a 3.7 inch, 800*480 device..

我倒要优化我的程序版本1.5

I d like to optimize my program version 1.5

更新::如果我还没有绘制和布局的文件夹,然后我得到的资源未发现异常

update: If i havent "drawable" and "layout" folders, then i get "resource not found exception"

所以我的probleme是这样的:

So my probleme is this:

<一个href=\"http://stackoverflow.com/questions/4050390/different-resources-for-wvga800-and-wvga854\">Different对于WVGA800和WVGA854资源?

任何一个解决方案?

推荐答案

绘制-HDPI-854×480
绘制-HDPI-800×480
绘制-MDPI-小480x320

drawable-hdpi-854x480 drawable-hdpi-800x480 drawable-mdpi-480x320

布局为854x480

layout-854x480

放单个图像在三个不同的文件夹(HDPI(72 * 72),LDPI(48 * 48),MDPI(36 * 36))与休耕比率,并把只有一个布局为该。
我希望这是帮助。

put a single image in three different folder (HDPI(72*72),LDPI(48*48),MDPI(36*36)) with the fallowing ratio and put only one layout for that. I hope this is help.

这篇关于Android的布局,图形和分辨率,什么是最好的办法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆