If I add a large image to xxxhdpi folder does it gets resized automatically by Android to smaller images for other screen resolutions?
And if yes from which version of Android is this supported?
If I add a large image to xxxhdpi folder does it gets resized automatically by Android to smaller images for other screen resolutions?
And if yes from which version of Android is this supported?
Adding to my comment, this is from Android Developers - Supporting Multiple Screens.
Provide different bitmap drawables for different screen densities By default, Android scales your bitmap drawables (.png, .jpg, and .gif files) and Nine-Patch drawables (.9.png files) so that they render at the appropriate physical size on each device. For example, if your application provides bitmap drawables only for the baseline, medium screen density (mdpi), then the system scales them up when on a high-density screen, and scales them down when on a low-density screen. This scaling can cause artifacts in the bitmaps. To ensure your bitmaps look their best, you should include alternative versions at different resolutions for different screen densities.
And from a Roman Nurik post
I talk about some of the key aspects of Android 4.4 KitKat that all Android designers should be aware of. Specifically:...
7) The introduction of new XXXHDPI (640dpi) launcher icon assets due to the Nexus 5 launcher's icon scaling behavior.
So it seems that it will scale, and that the resolution xxxhdpi is a newer implementation. I really would avoid using xxxhdpi images in an application unless you plan on using them specifically and for a good reason as they are going to be large files.
Edit It does seem xxxhdpi was introduced in 4.3, as stated in this Android Police Article. Either way, it hasn't been around for long and isn't used by many devices at this point, so I still say that unless you have an explicit reason to use a xxxhdpi image it isn't worth the space and scaling issues you might encounter by using it.
You shouldn't really need xxxhdpi. It was only introduced because of the way that launcher icons are scaled on the Nexus 5's launcher.
So throw your image into xxhdpi and it will scale down for other devices. The only issue you'll have is quality. You'd get higher quality out of the image if you scale it yourself.
Adding to my comment, this is from Android Developers - Supporting Multiple Screens.
Provide different bitmap drawables for different screen densities By default, Android scales your bitmap drawables (.png, .jpg, and .gif files) and Nine-Patch drawables (.9.png files) so that they render at the appropriate physical size on each device. For example, if your application provides bitmap drawables only for the baseline, medium screen density (mdpi), then the system scales them up when on a high-density screen, and scales them down when on a low-density screen. This scaling can cause artifacts in the bitmaps. To ensure your bitmaps look their best, you should include alternative versions at different resolutions for different screen densities.
And from a Roman Nurik post
I talk about some of the key aspects of Android 4.4 KitKat that all Android designers should be aware of. Specifically:...
7) The introduction of new XXXHDPI (640dpi) launcher icon assets due to the Nexus 5 launcher's icon scaling behavior.
So it seems that it will scale, and that the resolution xxxhdpi is a newer implementation. I really would avoid using xxxhdpi images in an application unless you plan on using them specifically and for a good reason as they are going to be large files.
Edit It does seem xxxhdpi was introduced in 4.3, as stated in this Android Police Article. Either way, it hasn't been around for long and isn't used by many devices at this point, so I still say that unless you have an explicit reason to use a xxxhdpi image it isn't worth the space and scaling issues you might encounter by using it.
It was first spotted in the 4.3 source (see Android Police) and its distribution is currently less than 0.1% (see Screen Sizes and Densities). Although the images would scale down you should include lower resolutions (I would go with mdpi, hdpi and xhdpi without xxxhdpi) to ensure both high image quality and high performance.
© 2022 - 2024 — McMap. All rights reserved.