문제

I am developing android apps for years now, and I always struggled with the part of resizing all icons for all different screen densities. A couple of days ago I developed a utility for making this task easy and released it's source. But I received the following comment:

"If you have a mdpi device, and an app only has xhdpi resources, the system will scale the xhdpi resources down to mdpi size automatically."

So, I should not create all icons in different sizes for all screen densities??? Have I been wasting effort and time all this years?

도움이 되었습니까?

해결책

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.

http://developer.android.com/guide/practices/screens_support.html

But you did not wast effort and time because to ensure your bitmaps look their best, you should include alternative versions at different resolutions for different screen densities. Also this will give better performance

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top