UI for different screen densities

前端 未结 2 534
夕颜
夕颜 2021-01-29 04:00

I don\'t understand the benefit of resources configuration qualifiers designed to support multiple screen densities, for example :

  • for an mdpi you put an icon o

2条回答
  •  攒了一身酷
    2021-01-29 04:08

    You are certainly welcome to just ship -xhdpi drawables and have Android downsample as needed. I expect that many developers do just that.

    However, please understand that you are no longer in control over what your drawables look like on lower densities. You are placing your trust in Android's drawable resampling algorithm, which:

    • is going to be more optimized for low CPU and memory use than would a desktop OS graphics tool, and therefore may not be as good of quality; and

    • may vary by Android OS version

    Shipping alternative artwork in different densities gives you more control, albeit for greater development effort and a larger APK size.

    If you do not want that control, that is your choice. At the same time, please do not begrudge other developers' desire to have that control and have potentially higher quality results on lower-density devices.

提交回复
热议问题