其他分享
首页 > 其他分享> > Android xxxhdpi可绘制分辨率自动调整大小

Android xxxhdpi可绘制分辨率自动调整大小

作者:互联网

如果我将一个大图像添加到xxxhdpi文件夹中它是否会被Android自动调整为较小的图像以用于其他屏幕分辨率?

如果是,支持哪个版本的Android?

解决方法:

添加到我的评论,这是从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.

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.

所以它似乎会扩展,并且分辨率xxxhdpi是一个更新的实现.我真的会避免在应用程序中使用xxxhdpi图像,除非你打算专门使用它们,并且有充分理由因为它们将成为大文件.

编辑
似乎xxxhdpi是在4.3中引入的,如this Android Police Article所述.无论哪种方式,它都没有存在很长时间,此时许多设备都没有使用它,所以我仍然说除非你有明确的理由使用xxxhdpi图像不值得使用它可能遇到的空间和缩放问题.

标签:android,image,resolution,size,hdpi
来源: https://codeday.me/bug/20190528/1173444.html