Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

creating Android assets (LPDI,MDPI,HDPI,XHDPI) for an app?

I Need to create a Designs for a Andriod Application.

I can see everyone are speaking about this "ldpi,mdpi,hdpi & xhdpi....etc.," My biggest doubt is in WHAT RESOLUTIONS, I should create the designs in Photoshop?? As there are lots of screen sizes available now. WHAT DEFAULT SCREEN SIZES I SHOULD DESIGN WITH FOR EACH "ldpi,mdpi,hdpi & xhdpi ?" Like for Xhdpi - What Screen resolution Should I do ?

a. 720x1280 - 320 dpi
b. 2048x1536 - 320 dpi
c. 2560x1536 - 320 dpi
d. 2560x1600 - 320 dpi

Again the same resolutions for ldpi,mdpi and hdpi ? What Screen Resolutions for the respective DPI's Which Screen Resolutions for

a. 120 dpi ?
b. 160 dpi ?
c. 240 dpi ?

PLEASE CLARIFY ME GUYS. THANKS A TON IN ADVANCE

like image 560
chosensoul Avatar asked Dec 26 '22 15:12

chosensoul


2 Answers

See this calculator.

ldpi is 120 dpi
mdpi is 160 dpi
hdpi is 240 dpi
xhdpi is 320 dpi
xxhdpi is 480 dpi 
xxxhdpi is 640 dpi

(Thanks to Tobor for adding those last two and correcting my typo, I accidentally overwrote his edit)

Also, I don't know why Maneti's initial advice was downvoted. When in doubt, use this tool (or the one in your android sdk) to generate your icons, then import those icons you generated into Photoshop. That's actually the most pragmatic and easiest solution (that doesn't require any thinking on your part and yet that solution works all the time for densities).

As to the size of an image (as defined by the Android guidelines/terminology), only worry about the size of that image if it's a image that could potentially take the entire width, or the entire height, of the screen (like a large background image for instance).

So in most cases, most developers end up not needing the size qualifier for their drawables (because it won't make a difference unless it's a large background image).

like image 65
Stephan Branczyk Avatar answered Feb 11 '23 11:02

Stephan Branczyk


For 120, 160, 240 dpi, respectively, I'm condidering 240*320, 320*480 and 480*800 (or 854) screen sizes.
For xhdpi (320) I'm considering 1280*720 (or 800).

But this is only a reference

Take in account that your design should scale

So, the graphical elements should stretch or be repositioned well.

After all, the screen size is not so important, if you project your objects positions and sizes well.

Use dp for objects and sp for font sizes, use the proper dpi resolutions for graphics and you shold be fine.

You can't follow any existing resolution. Generalize.

like image 30
Phantômaxx Avatar answered Feb 11 '23 10:02

Phantômaxx