Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Why do I need to provide xhdpi, hdpi and mdpi images if I can provide one for xxhdpi or greater?

Why do I need to provide xhdpi, hdpi and mdpi images if I can provide one for xxhdpi or greater and be sure that it would be downscaled correctly?

2 Answers

Daniel Hartin
Daniel Hartin
18,106 Points

Hi

In short you don't, Android will handle this for you however it is recommended to provide images in all sizes so the different resolution screen won't produce 'blocky' or blurred images after being scaled up or down. It is entirely up to you. In some apps I have created with an extensive number of flat images and photos I have only had one med/good quality image that fits all simply to save the file size being too large.

It's personal preference really

Daniel

Murat Hasdemir
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Murat Hasdemir
Front End Web Development Techdegree Graduate 20,968 Points

As Daniel said it you pick your way to go if you choose to make on one size you may have some resolution problems but mostly it works fine. In other hand if you want to give all size separate images that will prevent resolution errors if you go with this type of programming I can offer you to use asset studio which saves me to many times from working with image processing programs it mostly work fine but before publish your app check for be sure.