Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm currently trying to support a larger range of devices with my Android app. However, even after reading through what the Android Dev Guide has to say on the issue, I'm unsure as to why I should provide different graphics for ldpi, mdpi and hdpi.

I understand that the images will automatically be scaled, so I can just supply hdpi graphics and let the device do the rest. Will the scaling quality be lower if the device does it? Will it be a performance issue? Right now I'm more worried about multiplying APK size by three.

like image 509
forneo Avatar asked Nov 27 '10 15:11

forneo


People also ask

What is LDPI Mdpi Hdpi?

Base density for Android is mdpi. All other densities are its appropriate ratios, which is as follows: 0.75x — low-density (ldpi) 1.0x — medium-density (mdpi) 1.5x — high-density (hdpi)

What is LDPI and Mdpi?

For example, if you have a bitmap drawable that's 48x48 pixels for medium-density screen (the size for a launcher icon), all the different sizes should be: 36x36 for low-density (LDPI) 48x48 for medium-density (MDPI) 72x72 for high-density (HDPI)

Why is it problematic to define Sizesusing pixels on Android?

Why is it problematic to define sizes using pixels on Android? Although screen pixel density varies, this does not impact the use of pixels to define sizes. Large devices always have more pixels, so your UI elements will be e=affected if you define them with pixels.


1 Answers

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.)
like image 184
Jean Hominal Avatar answered Nov 09 '22 12:11

Jean Hominal