Android standard for image assets

7.6k Views Asked by At

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.

4

There are 4 best solutions below

0
On
 //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

0
On

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
1
On

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.

0
On

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