In the development of the project, in order to make the size of the app as small as possible, so the artist in the transduction, the general will be able to stretch the pictures are made very small, so that our Android developers to learn to use Draw9patch to make stretched pictures. For example:
Such a small picture:
Made so large, but not deformed:
Okay, no nonsense, let's start with the steps below:
(1) Required tools: Draw9patch (path: G:\eclipse\adt-bundle-windows-x86_64-20140702\sdk\tools) focus on the red font, which is the tools/under the SDK Draw9patch.bat this file.
(2) When you double-click Open, File-->open 9-patch...--> Select the picture you want to stretch--OK, it will appear:
Resolution: A: The picture to be shrunk
B: The image is stretched in vertical, horizontal, vertical, and horizontal directions, respectively.
C: Zoom in and out of display a
D: Show the tensile degree of B
(3) The part A we need to use, just hold it in the part you want to stretch, move the mouse, for example:
From this we can see that part B, without being stretched and deformed, is a success. But one thing to note is that, like this figure, there are two places in the horizontal position that can be stretched, so it's best to stretch the part to the same size, or else it might be the result:
Although there is no distortion, if the horizontal stretch is too large, the left part is significantly larger than the right.
(4) Save the picture, namely: File-->save 9-patch...--> OK
Precautions:
Pictures saved after using Draw9patch have the. 9 mark, remember not to remove, otherwise, will not stretch normally.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
[Android] using Draw9patch to make stretched pictures