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?

Answers


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:

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


The left and top lines define the stretchable area. When you include your corners in the stretchable area, the image gets distorted. In this case, one black pixel touching the center of the image on the left and the same on the top would suffice. To identify the rectangle for the view contents, and thus the padding, you can use right and bottom lines.


Need Your Help

jQuery adding classes to classes

jquery class for-loop

I have a .PHP page where the class WardDept appears 20 times. What I am trying to achieve is to get jQuery to add a further class to the 1st, 2nd and 3rd instance of WardDept. I have the followin...

Drop down selections based on Previous selection but come empty

javascript jquery html arrays

I am running an event and it is in few cities, different dates and different times.. I want the options to appear based on the previous selection but before i selected it come empty !