Android Programming The Big Nerd Ranch Guide by Bill Phillips, Chris Stewart, Kristin Marsicano (z-lib.org)

(gtxtreme123) #1
For the More Curious: 9-Patch Images

In the 9-patch editor, first check the Show patches option to make your patches more visible. Now, fill
in black pixels on the top and left borders to mark the stretchable regions of the image (Figure 23.10).
You can also drag the edges of the colored overlay to match the figure.


Figure 23.10  Creating a 9-patch image


The black line at the top of the image specifies a region to stretch if this image is stretched horizontally.
The line on the left indicates which pixels to stretch if the image is stretched vertically.

Free download pdf