Android: Why create specific images for ldpi, mdpi and hdpi? Android: Why create specific images for ldpi, mdpi and hdpi? android android

Android: Why create specific images for ldpi, mdpi and hdpi?


I can think of two reasons:

  1. Developer concern: Putting all icon versions in your package consumes space and bandwidth, scaling them on the fly consumes CPU. No prize for guessing which one is cheaper on a mobile device. (I suspect though that applications on the Android market will only download the applicable resources - in which case your users aren't even paying the space/bandwidth tax) Reference needed.
  2. A designer concern: when you scale down an icon manually, you can (and a devoted designer will insist to) redesign the icon in order to get crisper results than automatic scaling. Look at this page for a detailed explanation of why manually scaling icons is good. (He talks mainly about iPhone icons, but that applies to Android icons as well.)


I would guess one have to make a balanced decision between performance and size. If you provide only a hdpi graphic, the OS would naturally have to use some resources on down-scaling it for lower-resolution devices. But if you provide both a hdpi, mdpi and ldpi graphic, it would require a bit more space.

However, your fear for multiplying the APK size by three isn't too important in my opinion. First of all, if you anyhow provide a hdpi graphic, adding an mdpi and ldpi graphic (which both are less than the hdpi graphic in size (there is approximately 3:4:6 scaling ratio)) will increase the size, but far from triple it (more close to double). Secondly, the graphics doesn't make up all of the APK size, so tripling the amount of images will not triple the APK size either. And finally: since Android now supports apps-to-SD, the size of your app isn't as crucial as it were in earlier versions.


Will the scaling quality be lower if the device does it?

This is the one reason I would do it. For most images, I imagine the built in scaler will do just fine. However, most icons (launcher icon, notification icons) are going to be very pixel specific due to their small size. In those cases, making a smaller version manually will give you a sharper result than automatically scaling.