Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Optimized size and dpi for Android app images

My app has a background image and I would like to create different files of it for the sake of multiple screen support.

I sent this link (http://developer.android.com/guide/practices/screens_support.html) for a graphic designer but he asked me the dimensions in pixels that I want the images to be created with.

Considering that I have a graphic designer in my team and I don’t want to use a code to optimize the images loaded in memory (I only want to place the images in the correct folders for small, normal, large and xlarge screens), what are the most optimized size and dpi settings to generate it?

We are working with PNG files.

For the dpi we are following this:

  • ldpi Resources for low-density (ldpi) screens (~120dpi).
  • mdpi Resources for medium-density (mdpi) screens (~160dpi). (This is the baseline density.)
  • hdpi Resources for high-density (hdpi) screens (~240dpi).
  • xhdpi Resources for extra high-density (xhdpi) screens (~320dpi).

But for the dimensions I could only find this, which is in dp and not in px:

  • xlarge screens are at least 960dp x 720dp
  • large screens are at least 640dp x 480dp
  • normal screens are at least 470dp x 320dp
  • small screens are at least 426dp x 320dp
like image 752
Gustavo Avatar asked Jan 28 '13 17:01

Gustavo


1 Answers

1 dp = 1 px on 160dpi screen. But your best bet for screen dimens is to look here http://developer.android.com/guide/practices/screens_support.html#testing and scroll down to where is shows the screen dimens in pixels (eg: 1920x1080) (Table 3) Then check which ones you need most by looking at the chart http://developer.android.com/about/dashboards/index.html#Screens

but the first link will give you the most used screen dimensions in use by Android devices.

like image 118
Raigex Avatar answered Nov 11 '22 06:11

Raigex