What is a 9 patch?
9-patch images are stretched, repeated images are reduced to the smallest size; users draw a 1-pixel right and bottom solid black border to tell the system how to place content inside the image.
The 9 patch is a PNG image with an extension to the file name (filename.9.png) that allows the Android system to determine how the image can be stretched and distorted to fit the specific layout constraints.
The Android operating system reads the borders of these images to understand how to properly stretch the image and content in the image, such as text and effects.
9-patch theory 
9-patch gets its name from the fact that the created overlay splits the image into nine specific areas. Each region has certain tensile properties:
Corner Regions (1, 3, 7, 9) These regions are fixed and nothing inside them will stretch.
Horizontal sides (4, 6) If necessary, the pixels in this area will stretch vertically.
Vertical sides (2, 8) If necessary, the pixels in this area will stretch horizontally.
Center (5) The pixels in this area will stretch uniformly in both horizontal and vertical directions.
here are google docs
source share