1

Nexus 7 800x1280 tvdpi API 17

Eclipse IDE - uses drawable-xxhdpi

AVD - uses drawable-hdpi

Galaxy S4 1080x1920 xxhdpi API 19

Eclipse IDE - uses drawable-xxhdpi

AVD - uses drawable-xhdpi

NexusOne 480x800 hdpi

Eclipse and AVD use hdpi

Nexus4 768x1280 xhdpi

Eclipse and AVD use xhdpi

Questions

I am using the latest Eclipse/ADT bundle with APIs 8-19 added. I have been dutifully creating icons, buttons, and images in the mdpi, hdpi, xhdpi, and xxhdpi folders.

I changed my help button (that displays in most layouts) so it would be different in each of the drawable folders, so I could see what folder different devices use. Now I am finding that Eclipse uses the one I expect, but the AVD for the same device uses another folder (except the NexusOne).

Which one is right between Eclipse and the AVD? Can I trust what drawable folder it pulls my PNG files from? I have 140 png images in each folder now. The xxhdpi is obviously the largest and uses 1.8 Megs of storage. Should I get rid of it?

Thanks.

--EDIT

I now know that tvdpi is between mdpi and hdpi, and it's supposed to use hdpi and downscale it a bit. So, the AVD is correct to use hdpi.

I am still stumped with xxhdpi. Does the OS not use this density? It is mentioned here (with xxxhdpi too): Devices and Displays

It is not mentioned here: Providing Resources.

If you look at this: Android Devices, xxhdpi is used by 13 other devices too, starting with API 16. I put that table into a spreadsheet so I can sort it by any of the comuns.

With the S4 and future devices (like the upcoming 10 tablet), xxhdpi and possibly larger, will be more common.

Here is something else a google search provided: Make sure your app does not exclude xxhdpi screens

I am stumped on how to handle this.

Should I provide the drawable-xxhdpi folder with my app or not????

Rick Falck
  • 1,778
  • 3
  • 15
  • 19

2 Answers2

2

Which one is right between Eclipse and the AVD?

The hardware is right. Anything else is shaky. In particular, AVDs seem to get wonky with high densities.

Does the OS not use this density?

It is presently used on 9.7% of devices for ordinary resources. That's mostly your 1080p phone-sized screens. Also, generally speaking, it's a good idea to provide a launcher icon for the next higher density, as sometimes home screens use higher-density images as their base for launcher icons, so some -xhdpi devices may pull launcher icons from -xxhdpi, where available.

Should I provide the drawable-xxhdpi folder with my app or not?

That's up to you. Android will downscale or upscale images from other densities on the fly to fill in the gaps.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
1

CommonsWare is right! I just got an LG G2 and confirmed that it uses the xxhdpi folder for drawables. So, it is just an AVD/emulator problem.

Rick Falck
  • 1,778
  • 3
  • 15
  • 19