I am an iOS developer and new to Android development. I need to send the image asset requirements to designer. But I am not sure the standards for the size of images using in the android app. In iOS, the assets has to be of size 1x, 2x & 3x sizes. Similarly, what would be for Android? I have seen some folders like "ldpi, mdpi, hdpi, xhdpi, xxhdpi, & xxxhdpi" in the drawer folder of project. What each folder stands for. I need to tell the size of images for background, app icons, button icons, etc.

- 20,189
- 8
- 67
- 95

- 3,514
- 6
- 31
- 50
-
follow this http://stackoverflow.com/questions/9476662/how-to-set-android-layout-to-support-all-screen-sizes. – Radhey Dec 22 '16 at 05:08
-
2its normally follows 3:4:6:8 ratio ( like ldpi : mdpi : hdpi : xhdpi ) , let say your base icon size is 12 as per your screen design then ,you can make it different size of that icon like 12X3 = 36 (36x36) ,12x4 = 48 (48x48) ,12x6 = 72 (72x72) ,12x8 = 96 (96x96) .Here your base icon size can vary as per the designs ,its not fixed as i mention (ex:12) , you just have to calculate as per the aspect ratio. – Radhey Dec 22 '16 at 05:13
-
@sree_iphonedev did you get it not ?? – Harshad Pansuriya Dec 22 '16 at 05:52
-
Radheys comment is pretty clear. Thanks. – sree_iphonedev Dec 23 '16 at 09:53
-
What about the sizes for xxhdpi and xxxhdpi? – sree_iphonedev Dec 23 '16 at 09:57
4 Answers
In iOS we can create Assets for Image like 1x
,2x
,and 3x
. and if we looking for size of the 1x
, 2x
, and 3x
. it is like this format 40 x 40
, 80 x 80
and 120 x 120
.
so In iOS
1x : 40 x 40
2x : 80 x 80
3x : 120 x 120
and in Android
ldpi : 36 x 36
mdpi : 48 x 48
hdpi : 72 x 72
xhdpi : 96 x 96
xxhdpi : 144 x 144
Hope this will help you.

- 20,189
- 8
- 67
- 95
-
e.g.:- I have an image with 50dp by 50 dp. So ldpi should be 50, right? In this case what would be the sizes for others? – sree_iphonedev Dec 23 '16 at 09:51
The answer can be found on official android dev website but also can be found in the above answers. As the exact answer is not given, I'm attaching an image which should solve all the confusions.
This image shows the respective DPI's
And to further complete the answer,
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).
xxhdpi : Resources for extra-extra-high-density (xxhdpi) screens (~480dpi).
xxxhdpi : Resources for extra-extra-extra-high-density (xxxhdpi) uses (~640dpi).
https://developer.android.com/training/multiscreen/screendensities

- 21
- 3
Generalized densities in Android are
ldpi (low) ~120dpi
mdpi (medium) ~160dpi
hdpi (high) ~240dpi
xhdpi (extra-high) ~320dpi
xxhdpi (extra-extra-high) ~480dpi
xxxhdpi (extra-extra-extra-high) ~640dpi
1DPI (dot per inch) ~= 0.393701Pixels
- res is the standard folder in android for keeping resources.
- Please refer to Android 'Supporting Multiple Screens' @ https://developer.android.com/guide/practices/screens_support.html

- 1,317
- 9
- 13
//and android resolution is
layout-large-mdpi (1024x600)
layout-large-tvdpi (800x1280)
layout-large-xhdpi (1200x1920)
layout-xlarge-mdpi (1280x800)
layout-xlarge-xhdpi (2560x1600)
//There is a different devices in android like this (for images icon)
drawable-mdpi (48X48)
drawable-hdpi (72X72)
drawable-xhdpi (96X96)
drawable-xxhdpi (144X144)
drawable-xxxhdpi (192X192)
You have a put in all resolution images and system get automatically specific resolution mobile for more info refer this link: Different resolution support android