Choosing the right image size for you Android icons

With a number of different screen sizes and resolutions you can not rely on static pixel size alone. That is where Android uses dips, or Density Independent Pixels. The combination of screen size and resolution is measured in Dots Per Inch, that is, how many pixels can you fit on one inch ?

Each device falls into one of these categories:

Screen Shot 2015-09-11 at 23.12.50

When you read the Android developer guidelines on images you will see that Google always refers to dp when describing image sizes. To calculate the pixel size based on dpi you can use this conversion table :

Screen Shot 2015-09-11 at 23.15.03

What this means,- the pixel density on a XXXHDPI screen is four times higher than the pixel density on a MDPI device.

If you want to create a 48p sized icon the actual size in pixels is 48 pixels on a MDPI screen and 192 pixels on a XXXHDPI screen.

This might not be that useful to know by itself, but my next blog post will be about 9-patch images and knowing your dip is always a good start.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: