绘制的Andr​​oid三星Galaxy

绘制的Andr​​oid三星Galaxy

本文介绍了绘制的Andr​​oid三星Galaxy S4和Nexus 10的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个形象,是一个活动在我的应用程序的背景。

I have an image that is the background of one activity in my app.

有关三星Galaxy S4这个形象应该是1920×1080,并放置在xxhdpi文件夹。
对于Nexus 10的这个形象应该是2560×1600,并放置在xhdpi文件夹。

For the Samsung Galaxy S4 this image should be 1920x1080 and placed at the xxhdpi folder.For the Nexus 10 this image should be 2560x1600 and placed at the xhdpi folder.

这是废话放置图像中的xhpdi文件夹不是放置在xxhdpi文件夹中的图像更大。
而且因为我相信我误解的东西。

It's nonsense to place an image bigger in the xhpdi folder than an image placed at the xxhdpi folder.And because that I believe that I misunderstood something.

有人能解释一下我的误解?

Can someone explain what I misunderstood?

- 编辑 -

对于所有的回答问话如果nexus10真的xhdpi和S4 xxhdpi:

For all the answer questioning if the nexus10 is really xhdpi and the S4 xxhdpi:

prijupaul的答案是好的,但我没有任何的Nexus 10或银河S4进行测试。我发现了分辨率试图建立两个自动真空淀积系统,在设备配置中创建它说,这人会是怎样的配置。

The answer of prijupaul is good, but I don't have any Nexus 10 or Galaxy S4 to test. I discovered the resolution trying to create AVDs for both, in the device configuration creation it says what configuration it one will be.

推荐答案

您应该然后用另一种比预选赛如果xhdpi没有解决真正的问题。您可以使用,例如绘制-sw720dp(目标10片)。

You should then use another qualifier than xhdpi if resolution does really matter. You can use for example drawable-sw720dp (targets 10" tablets).

我个人的看法是,虽然你应该只是在最大尺寸的每个宽高比的版本。然后计算在运行时的纵横比,并选择从资产最好的形象。

My personal opinion though is that you should just have a version for each aspect ratio in the biggest size. Then compute that aspect ratio at runtime and pick the best image from assets.

这篇关于绘制的Andr​​oid三星Galaxy S4和Nexus 10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 15:22