문제

I am facing a problem with the size of the generated apk for my app...

I was wondering if there can be any issue if I use only the xxhdpi folder for my drawables... I know that there can be some problem with 9 patch drawable but I don't have any.

The system should take care for scaling down my images, right? Are there other effects that can be dangerous?

도움이 되었습니까?

해결책

  1. Yes, system takes care for scaling, but scaling at runtime can affect your app's performance, especially when the scaling factor is not power of 2.

  2. Normally scaling down a image wouldn't cause quality problems. however, it may produce a minor impact on image quality under some circumstances, here's a test:

    image in xxhdpi folder, left side is how it looks like on a Nexus 5 (xxhdpi), right side is how it looks like on a Nexus 4 (xhdpi). enter image description here

  3. If image size is less than 4px, app may crash when scaling down.

Conclusion: if app size is more important than problems above, then you can put all images in xxhdpi folder, except the small ones.

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