AVP06
AVP06

Reputation: 1079

Avoid Multiple Drawable Sets (hdpi/mdpi/ldpi)

Is there a way to avoid having multiple sets of drawables per resolution? I have close to 50 images (simple icons mostly, not using anything needing 9-patch), seems like a lot of redundant work to resize all 50 in Photoshop, also considering the rework if I have to change some of the icons in the future.

I understand the need for adjusting to multiple densities, but is there any way to avoid it lets say just by providing a high quality image and then enforcing the size as DP/DIP?

Also I see that my Android project has just a 'Drawable' folder in addition to *hdpi/mdpi/ldpi, what are the implications if I just place all my image resources to that folder instead of resolution specific? (assuming that I'm ok with my images being resized by the device)

Upvotes: 4

Views: 1442

Answers (5)

user3278416
user3278416

Reputation:

You can easily resize any images in xxhdpi, xhdpi ,hdpi and mdpi by Checking these site.Hope it may be help you.

Upvotes: 0

Matthewek
Matthewek

Reputation: 1559

What about Vector graphic? Which might be resized without quality loss. AndEngine has SVG extension, AndEngine is mostly game engine, but you can build your app as well. With svg files, you won't have to worry about app size.

Upvotes: 0

Sander van't Veer
Sander van't Veer

Reputation: 5980

A quick tip for the resizing the images: FastStone image resizer

It's a fast, easy, and free image resizer that doesn't seem to lose any quality. I use it very often and it has never let me down. Works with transparent PNG's as well.

Upvotes: 3

inazaruk
inazaruk

Reputation: 74780

If you don't care about all the potential issues with different densities, than go ahead and put all your drawables into drawables folder. They will be picked up correctly. But you'll find that it's better to have larger application size than worse looking app in the long run.

Also, its usually safe to put 9-patches to 'drawables' as they usually do not contains density specific data (like complex images).

Upvotes: 2

Sparky
Sparky

Reputation: 8477

You can provide images at just one density. But you will have fuzziness when you scale up, and loss of detail when you scale down. This is probably not a big deal with photorealistic images, but will be more apparent in line art. For better results, draw your icons in a vector format and export at different sizes. For simple line drawings, I like to use Google Docs.

Upvotes: 1

Related Questions