9 patch image incorrectly streeched in xhdpi density

前端 未结 3 1495
无人共我
无人共我 2021-01-15 17:17

I have problems with a 9 patch image when displayed in XHDPI.

It seems as there were a bug in Android because when displayed in HDPI is displayed correctly:

3条回答
  •  被撕碎了的回忆
    2021-01-15 17:53

    I assume your image is saved under the hdpi folder and there is no image in the xhdpi folder. You can copy the image file to the xhdpi folder, or change the image to the following. When the screen is xhdpi, and the image is hdpi, before opening in it is scaled to be 50% larger, so sub-pixel stretching will do the effect you see.

    Image that prevents sub-pixel stretch errors

提交回复
热议问题