Issue
If we provide an image for every density bucket i.e all the drawable folders (ldpi,mdpi,hpi,xhdpi,..etc) then android will pick the matching resources and will be displayed accordingly.
but what if we provide images for alternate drawable folder
- mdpi
- xhdpi
- xxxhdpi
so my doubt is from where will the other phones with non specified drawable folder take resources from, will it take from the higher or from the lower?
For e.g hdpi devices will it take resources from mdpi folder or xhdpi folder?
Solution
According to the official documentation
Exception: If the qualifier in question is screen pixel density, Android selects the option that most closely matches the device screen density. In general, Android prefers scaling down a larger original image to scaling up a smaller original image. [...]
So it take the larger closest image to scale to hdpi density.
Answered By - Hugo Gresse
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.