9 patch images scaled in the wrong position

I am using the ninth patch image as a highlighted element of a selector element. An image with nine patches is here:

9 patch image

The image that finally got the visualization is this (screenshot of the emulator and device, both devices have resolutions> mdpi):

resulting rendered image

As you can see, it was scaled outside the stretchable area (as defined in the 9 patch file), the dark green bar is much thicker, as it should be. Why can this be and can be avoided? The draw9patch tool scales this image correctly. Is this because Android is trying to maintain physical size on high-resolution devices?

+5
source share
2

mdpi ?

Android , . , 9patch.

, hdpi, .

, hdpi xhdpi . 9patch , , /.

+6

9 :

enter image description here

? . - 9Patch:

enter image description here

+3

All Articles