Search code examples
androidandroid-layoutnine-patch

Nine-Patch Image Slicing, Padding Issue


So I've patched an image however it has padding on the left and right which I DO NOT want, however when I patch the image without padding the corners on the image get distorted when it's drawn in a layout.

Below is a screenshot of how I am doing it, how would you overcome this issue?

enter image description here


Solution

  • Maybe just try to specify the padding the way it's meant to be specified, i.e. by drawing the bottom (and right if you want) border in 9-patch tool. Like this:enter image description here

    This way the padding should be right (side to side) and corners not distorted.