可绘制的qHD分辨率 [英] Drawables for qHD resolution

查看:152
本文介绍了可绘制的qHD分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设计一个游戏可能于各种Android设备,让我有不同分辨率的手机多次绘制的文件夹,以及平板电脑。下面是我的文件夹列表:

I'm designing a game possibly for all kinds of Android devices, so I have multiple drawable folders for phones of different resolutions, and for tablets. Here is the list of my folders:

  • 绘制-MDPI - 为小480x320设备
  • 绘制 - 华电国际 - 为800×480和854×480的设备
  • 绘制-大华电国际 - 为1024×600粒
  • 绘制-XLARGE-MDPI - 为1200x800片

我的问题是什么名字应该有一个文件夹可绘制的qHD分辨率,也就是960×540和256 dpi的?先谢谢了。

My question is what name should have a folder with drawables for qHD resolution, which is 960x540 and 256 dpi? Thanks in advance.

推荐答案

我将深刻,强烈,着重建议您不要使用 - 大或-xlarge预选赛可绘制。如果你这样做,你几乎可以肯定不是做你认为你是。

I will deeply, strongly, emphatically encourage you not to use "-large" or "-xlarge" qualifiers with drawables. If you are doing this, you are almost certainly not doing what you think you are.

例如。

绘制-大华电国际并不意味着1024×600片。这意味着被列为大的华电国际的屏幕。有一个的巨大的屏幕尺寸适合这一类的数量。事实上,你很快就会看到1024x600的MDPI片。

"drawable-large-hdpi" does not mean "1024x600 tablets." It means an hdpi screen that is classified as large. There are a huge number of screen sizes that fit in this category. In fact you will soon be seeing 1024x600 mdpi tablets.

和绘制-XLARGE-MDPI并不意味着1200x800平板电脑。首先,一样的Xoom平板电脑实际上是1280×800。和其他可能的解决方案是在这里为1280x720,960x720,1920x1200的,和和和。

And "drawable-xlarge-mdpi" does not mean "1200x800 tablets." First of all, tablets like the Xoom are actually 1280x800. And other possible resolutions here are 1280x720, 960x720, 1920x1200, and on and on and on.

如果你正在做这样的事情,让我建议:只写一些code来代替。如果你有一组要挑选到最符合您有可用的空间,在你的用户界面可绘制的,写一些code,着眼于它的可用空间,并挑选一个绘制。当你这样做,不要使用Display.getDisplayMetrics()。实现此基础上居然给视图层次结构的相应的视图的空间。

If you are doing this kind of thing, let me suggest: just write some code instead. If you have a set of drawables that you want to pick to best match the space you have available in your UI, write some code that looks at the space it has available and picks a drawable. And when you do this, don't use Display.getDisplayMetrics(). Implement this based on the space actually given to your appropriate view in the view hierarchy.

现在所有的说,的qHD屏幕一般华电国际正常大小。

Now all that said, qHD screens are generally hdpi normal size.

那么,另外一个例子:绘制 - 华电国际并没有什么关系的决议都没有。可能的解决方案,你会在这里看到:800×480,640×480,960×540,并和。 \

So, another example: "drawable-hdpi" doesn't have anything to do with a resolution at all. Possible resolutions you will see here: 800x480, 640x480, 960x540, and on and on. \

这篇关于可绘制的qHD分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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