开发者

Why is Android looking for QVGA resources in the wrong order mdpi > hdpi > ldpi?

I'm trying to do some testing with a QVGA emulator and I find that it looks for an image resource in the mentio开发者_StackOverflow社区ned order.

drawable-mdpi 1st

drawable-hdpi 2nd

drawable-ldpi 3rd

(it does get found only after I change the name of the image in the other two dirs for testing)

I would expect it to be ldpi first.

When running other emulators (HVGA and WVGA) they use their appropriate drawable dirs... it's only QVGA. The only code that I see could affect this is here (based on the docs)

I have tested this with a 2.0 emulator and a 1.6, I get the same result.

Any ideas? Thank you very much.


Check the hw.lcd.density setting in the config.ini for you QVGA AVD. If this is set incorrectly then the emulator might not be running as a low density device. It should be 120.

You can also check using the Details button in the Android SDK and AVD Manager GUI which you can launch from Eclipse or by entering android at a command prompt:

Why is Android looking for QVGA resources in the wrong order mdpi > hdpi > ldpi?


It appears that I have to enter the density manually.

If I just select QVGA as a Skin from the "Built-in" drop down list it puts 120 as the value for the Abstracted LCD density, but it doesnt seem to work...

So I delete that property and add it back, then change the value to 120. Thank you much Dave for your direction.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜