Android XXHDPI 资源 [英] Android XXHDPI resources

查看:29
本文介绍了Android XXHDPI 资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google Nexus 10 即将面世,并且是第一款使用 xxhdpi 资源.它的显示密度约为 300 DPI(根据 Nexus 10 网站这个计算器).

The Google Nexus 10 comes out shortly, and is the first device to use xxhdpi resources. It sports a display density of about 300 DPI (according to the Nexus 10 website and this calculator).

但是,当我转到 Android 文档时,它指出:

However, when I go to the Android documentation, it states:

  • ldpi : ~120dpi
  • mdpi : ~160dpi
  • hdpi : ~240dpi
  • xhdpi : ~320dpi
  • xxhdpi 未指定.
  • ldpi : ~120dpi
  • mdpi : ~160dpi
  • hdpi : ~240dpi
  • xhdpi : ~320dpi
  • xxhdpi is not specified.

为什么 Nexus 10 的 300 DPI 屏幕是 xxhdpi 而不是 xhdpi应该是什么xxhdpi 的近似 DPI?在这一点上,我们是否应该担心 xxhdpi 的新资源(除了图标),还是应该让操作系统扩展 xhdpi 资源?

How come the Nexus 10's 300 DPI screen is xxhdpi instead of xhdpi, and what should be the approximate DPI of xxhdpi? Should we even worry about having new resources (aside from icons) for xxhdpi at this point, or should we just let the OS scale up xhdpi resources?

推荐答案

根据 G+ 资源中链接的帖子:

According to the post linked in the G+ resource:

Nexus 10 上的华丽屏幕落入 XHDPI 密度桶.在平板电脑上,Launcher 使用一个密度范围内的图标[0] 使它们稍微变大.确保您的启动器图标(可以说是您的应用程序最重要的资产)很清晰,您需要添加一个drawable-xxhdpi 或 drawable-480dpi 文件夹中的 144*144px 图标.

The gorgeous screen on the Nexus 10 falls into the XHDPI density bucket. On tablets, Launcher uses icons from one density bucket up [0] to render them slightly larger. To ensure that your launcher icon (arguably your apps most important asset) is crisp you need to add a 144*144px icon in the drawable-xxhdpi or drawable-480dpi folder.

所以看起来 xxhdpi 设置为 480dpi.据此,平板电脑使用的 dpi 存储桶中的资产比它们用于启动器的资产高.Nexus 10 在存储桶 xhdpi 中会从 xxhdpi 中拉出启动器图标.

So it looks like the xxhdpi is set for 480dpi. According to that, tablets use the assets from one dpi bucket higher than the one they're in for the launcher. The Nexus 10 being in bucket xhdpi will pull the launcher icon from the xxhdpi.

来源

此外,不知道平板电脑从其级别以上的资产桶中获取资源.注意到了.

Also, was not aware that tablets take resources from the asset bucket above their level. Noted.

这篇关于Android XXHDPI 资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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