什么布局适合720x1280 Android设备? [英] What layout is suitable for 720x1280 Android devices?

查看:322
本文介绍了什么布局适合720x1280 Android设备?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了一个时钟控件。而我只有1 RES /布局和1 RES /绘制。一切都完美。

I have developed a clock widget. And I only have 1 res/layout and 1 res/drawable. Everything works perfectly.

它适用于MDPI像三星Galaxy王牌。它适用于华电国际像三星Galaxy S2。它适用于xhdpi像三星Galaxy Note的。

It works on mdpi like Samsung Galaxy Ace. It works on hdpi like Samsung Galaxy S2. It works on xhdpi like Samsung Galaxy Note.

不过我丑的神情720x1280设备,如三星Galaxy Nexus的或索尼Xperia S.和即将推出的三星Galaxy S3。

However I got ugly look on 720x1280 devices such as Samsung Galaxy Nexus or Sony Xperia S. And coming soon Samsung Galaxy S3.

当我提供RES /设计/ xhdpi这是我专门为720x1280设备,然后Galaxy Note的也将采用这种布局,它看起来丑陋的Galaxy Note的。

When I provide res/layout/xhdpi which I built specifically for 720x1280 devices and then Galaxy Note will also use this layout and it looks ugly on Galaxy Note.

如何解决这个问题?

这就像之间720x1280(Galaxy Nexus的,索尼Xperia S,银河S3)和800x1280(Galaxy Note的)一些交叉。

It is like some crossing between 720x1280 (Galaxy Nexus, Sony Xperia S, Galaxy S3) and 800x1280 (Galaxy Note).

推荐答案

分辨率和设备不一定匹配的DPI(分辨率高并不意味着高DPI)。 DPI是设备,其物理尺寸的分辨率的比率。

The resolution and DPI of the device don't necessarily match up (high resolution doesn't mean high DPI). DPI is a ratio of the resolution of the device and its physical dimensions.

而不是通过DPI分离布局的文件夹,按尺寸将它们分开。例如,布局大布局XLARGE 。您还可以通过特定的尺寸,如布局-W720-h1280 ,量化在这种情况下,将只匹配设备720像素的最小宽度为1280像素,最小高度

Instead of separating your layout folders by DPI, separate them by dimensions. For instance, layout-large, layout-xlarge. You can also quantify by specific sizes, such as layout-w720-h1280, in which case that would match only device with a minimum width of 720 pixels and minimum height of 1280 pixels.

这篇关于什么布局适合720x1280 Android设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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