Only use XHDPI drawables in Android app?

后端 未结 7 902
夕颜
夕颜 2020-12-02 13:01

If you\'re planning to support LDPI, MDPI, HPDI, and perhaps XHDPI in the near future, is it ok to only include XHDPI drawables in the project and let the devices scale them

7条回答
  •  醉酒成梦
    2020-12-02 13:45

    XHDPI was only introduced in Android SDK API Level 9 (Gingerbread) (see http://developer.android.com/reference/android/util/DisplayMetrics.html#DENSITY_XHIGH) so if you plan to have a minimum SDK level of less than 9 you will also need to provide, at least, HDPI drawables as well otherwise devices with Froyo or below will display nothing.

    Update: It actually seems like versions prior to Gingerbread will display xhdpi images: https://groups.google.com/d/msg/android-developers/yjYO91OmoJ4/v3he0ZbKo-UJ

提交回复
热议问题