Sizes for drawable: LDPI, MDPI, HDPI, XHDPI, XXHDPI, XXXHDPI?

Issue

What are the recommended sizes for drawable: LDPI, MDPI, HDPI, XHDPI, XXHDPI, XXXHDPI or i can use same size image for all and change it programatically like changing in width and height?

Solution

Inside Android Studio, if you right click on the res folder, you can select New > Image Asset which will create properly sized drawables for those dpi bucket folders.

Optionally, you can also use a website like this one: http://romannurik.github.io/AndroidAssetStudio/index.html

You can also programmatically change width/height, but this is heavily discouraged due to how disgusting a smaller image looks when it’s stretched large. Only use this programmatic solution if you use vector images.

Answered By – Jackey

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published