On Sun, Aug 14, 2011 at 1:58 PM, Droid <[email protected]> wrote:
> So on an hdpi screen the icons will be smaller.

A 48x48 pixel icon on an hdpi screen will be around 0.15" on a side.

A 48x48 pixel icon on an hdpi screen will be around 0.2" on a side.

A 48x48 pixel icon on an mdpi screen will be around 0.3" on a side.

A 48x48 pixel icon on an ldpi screen will be around 0.4" on a side.

> So my apps made on a nexus and emulator will
> not display as I believe they will.

An emulator can be any of the densities -- you specify that as part of the AVD.

> Then drawable-large folder is for large screens with hdpi or
> mdpi?

drawable-large/ makes no assumption regarding density. A large-screen
device that is ldpi, mdpi, hdpi, or xhdpi might all use a
drawable-large/

> Clearly I need to go to school about all this because I come
> from a programming background. At first site I need larger images
> for larger dpi screens. Hope I can find out how much larger and
> which folder to put them in.

Assuming you want the image to stay the same size on different screen
densities, you will have more pixels in the higher densities and lower
pixels in the lower densities.

To reverse the above analysis, for a 0.3" image, you need 36x36 pixels
in ldpi, 48x48 in mdpi, 72x72 in hdpi, and 96x96 in xhdpi.

Note that there are no production xhdpi devices on the market AFAIK,
though a rumored device for later this year might fit that density
bucket.

Also note that Android will automatically scale your artwork for you
if you want. So, one strategy is to put a 72x72 image in
drawable-hdpi/ and let Android scale it to smaller pixel counts for
the lower densities. On the plus side, this is less work and makes for
a smaller APK. On the minus side, you do not have control over the
quality of the scaled output and this consumes a bit more CPU time
(not sure when, I assume when the resource is first referenced in the
app).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_Android Programming Tutorials_ Version 3.9 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to