Android的绘图资源 - 使用xhdpi为华电国际 [英] Android drawables - use xhdpi for hdpi

查看:167
本文介绍了Android的绘图资源 - 使用xhdpi为华电国际的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最后两个问题留答复,我希望第三个是魅力作品:)

我想要的应用程序,是华电国际使用的文件夹绘-xhdpi和LDPI设备的那些可绘制在绘-MDPI。所以我不必重复相同的图像。这可能吗?


解决方案

是的,Android的鳞片可绘制选择将产生最好的结果绘制。但并不是所有的缩放组合的工作都顺利。下调到MDPI可以产生明显的效果差。 XHDPI到华电国际通常产生pretty良好的效果。但考虑到绝大多数设备,这些天是华电国际的,它可能是值得的有华电国际的资源。华电国际以XHDPI比例并不可怕。有些1280x720的设备使用XHDPI资源。这些通常看起来OK。谷歌电视采用XHDPI为好。在一个巨大的屏幕,缩放错误是可见的。

现在不存在的

-

LDPI设备 - 所有的实际目的。

True时产生缩放资源是一个巨大的PITA。但是,在我看来,你真的需要做MDPI和HDPI。一旦你已经得到了不愉快的工作流下来,它不需要大量的额外工作来产生XHDPI。对于它的价值,如果你的作品是矢量格式,绝大多数的资源,不需要扭捏作具体决议。目前似乎没有任何迫切需要的像素排列方对象的边缘,例如。通常它只是在复杂的图标和艺术品,从像素推一定量的室内受益的特点。

这是pretty明确表示XHDPI将要到来越来越普遍。相信我,你不想回去,事后重新做XHDPI所有的艺术品。我的建议是:如果你打算还是从现在开始出货您的应用程序一年,吸起来,做讨厌的,你去,同时它还是比较容易的。

Last two questions stayed unanswered, I hope "third one's the charm" works :)

I want application that is HDPI use those drawables in folder "drawable-xhdpi" and LDPI devices those in "drawable-mdpi". So I don't have to duplicate same images. Is this possible?

解决方案

Yes, Android scales drawables, selecting the drawable that will produce the best result. But not all scaling combinations work that well. Downscaling to MDPI can produce noticeably poor results. XHDPI to HDPI generally produces pretty good results. But given that the overwhelming majority of devices these days are HDPI, it's probably worthwhile to have HDPI resources. HDPI to XHDPI scaling is not terrible. Some 1280x720 devices uses XHDPI resource. These generally look ok. Google TV uses XHDPI as well. On a huge screen, scaling errors are visible.

LDPI devices are -- for all practical purposes -- non-existent now.

True that generating scaled resources is an enormous PITA. But, in my opinion, you really need to do MDPI and HDPI. And once you've got that unpleasant workflow down, it doesn't require a lot of extra work to generate XHDPI. For what it's worth, if your artwork is in vector format, the vast majority of resources don't need tweaking for specific resolutions. There doesn't seem to be any compelling need to pixel-align edges of square objects, for example. Usually it's only interior features in complex icons and artwork that benefit from some amount of pixel-pushing.

It's pretty clear that XHDPI is going to be come more and more common. Trust me, you don't want to go back and re-do all your artwork in XHDPI after the fact. My advice: if you intend to still be shipping your app a year from now, suck it up, and do the nasty as you go, while it's still relatively easy.

这篇关于Android的绘图资源 - 使用xhdpi为华电国际的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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