The sense of providing MDPI and HDPI resources

五迷三道 提交于 2019-12-13 15:19:24

问题


For every app I'm developing I provide mdpi, hdpi, xhdpi, xxhpi resources (also launcher icon for xxxhdpi). Less and less devices are mdpi/hdpi that's why I'm wondering if is there any sense to provide these resources? Both xhdpi and xxhdpi resources can be easily scaled down to mdpi and hdpi accordingly (ratio 0.5).

The documentation states:

For example, when looking for a low-density resource and it is not available, the system prefers to scale-down the high-density version of the resource, because the system can easily scale a high-density resource down to low-density by a factor of 0.5, with fewer artifacts, compared to scaling a medium-density resource by a factor of 0.75.

I haven't found any articles describing the built-in scaling mechanism in comparison to 'native' resources for a given density.

Are there any benefits for providing mdpi and hdpi resources these days?


回答1:


I don't think it is worth to provide resources for every density. I have an app with a lot of resources, and I decided to try providing only xxhpi resources.

I didn't see any difference in lower resolution devices, and I was able to reduce the .apk from 7.3MB to 4.4MB!

This said, even if you lose (let's say) 15% of quality, it will compensate only by reducing the .apk size, and consequently an increase of downloads!



来源:https://stackoverflow.com/questions/24098973/the-sense-of-providing-mdpi-and-hdpi-resources

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!