Nine-patch

http://developer.android.com/guide/topics/graphics/2d-graphics.html#nine-patch

 

This NinePatch defines one stretchable area with the left and top lines

and the drawable area with the bottom and right lines.

In the top image, the dotted grey lines identify the regions of the image that will be replicated in order to stretch the image.

The pink rectangle in the bottom image identifies the region in which the contents of the View are allowed.

If the contents don't fit in this region, then the image will be stretched so that they do.

 

image

 

大致意思:

左边线和上边线圈定的区域是用来拉伸的。

右边线和下边线形成的区域是用来填充内容的,这个是可选的。

image

你可能感兴趣的:(pat)