Android不兑现LDPI预选赛 [英] Android does not honor ldpi qualifier

查看:188
本文介绍了Android不兑现LDPI预选赛的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要区分布局/可绘制以下两个设备:

I want to distinguish layout/drawables for the following two devices:

1) 7" hdpi
2) 7" ldpi

所以我用下面的合格目录:

So I am using the following qualified directories:

1) layout-sw600dp-hdpi / drawable-sw600dp-hdpi
2) layout-sw600dp-ldpi / drawable-sw600dp-ldpi

但是,当我在像素480x764屏幕尺寸7LDPI设备上运行,那么机器人(V4.0.3)选择华电国际版本。这是为什么?当我阅读文档,LDPI应该是更合适。

But when I run on a 7" ldpi device with screen size in pixels 480x764, then Android (V4.0.3) chooses the hdpi version. Why is that? When I read the documentation, ldpi should be the better fit.

当我删除布局sw600dp-HDPI /绘-sw600dp - 华电国际完全,它不选2),一切都很好。但我也需要华电国际版本。

When I remove layout-sw600dp-hdpi / drawable-sw600dp-hdpi completely, it does choose 2) and everything is fine. But I also need the hdpi version.

所以,我怎么能分辨出7设备的LDPI / HPDI版本?

So how can I distinguish the ldpi/hpdi version of a 7" device?

感谢您!

安德烈

推荐答案

我再也找不到参考,但我认为我已经读的地方,你不应该使用一个最小宽度(swdp)或即时拍摄宽度(WDP)在同时比屏幕的像素密度(LDPI,hdpi的等),并且这样的组合的结果是不确定的。

I cannot find the reference anymore but I think that I've read somewhere that you shouldn't use a smallestWidth (swdp) or Avilable width (wdp) at the same time than a Screen pixel density (ldpi, hdpi, etc.) and that the result of such a combination was indefinite.

如果你有不同的图形内容被显示为不同的屏幕像素密度,你应该把它们像绘制-LDPI /或的icon.png绘制,华电国际/的icon.png,分开布局剧目,并保持自己绘制的剧目只有swdp术语,这些布局剧目。

If you have different drawables to be displayed for different Screen pixel density, you should put them in their own drawable repertory like drawable-ldpi/icon.png or drawable-hdpi/icon.png, separate from the layout repertories and keep only the swdp term for these layout repertories.

这篇关于Android不兑现LDPI预选赛的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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