9patch: make part of the stretched Image
Preface:
Everyone should have this experience. When we set a background for the button, because the button shows too much content,
This image is stretched and looks pretty bad. We usually want to zoom in and out the text.
The emergence of 9patch can easily solve this problem!
You can directly watch videos without reading text.
Link: 9patch basic tutorial
Where is 9patch?
Sdk directory ---> tools ---> draw9Patch. bat
After you double-click it, a cmd box will pop up, so you don't have to worry about it.
Ps: Don't worry about shutting down the cmd later!
<喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> Vcd4kpggypsq508pb97pmow.vadi + cjxomz6i2btyv6rsqr340nc0psdttctnvmasow.vadm + CjxwPjxpbWcgc3JjPQ = "http://www.2cto.com/uploadfile/Collfiles/20140321/2014032112543695.png" alt = "\">
② After opening
③ Currently, Images cannot be operated directly because they are locked.
Remove the trench of the show lock below.
④ Check Show patches below
The current red/purple part is the current scaled area.
We leave around for a while, and there is an extra pixel line separated by white and black. This is our main operation object.
⑤ On the left or top of the outermost layer, click the pixel or pull, and click the top point on the left.
⑥ The Red Area (sb) is the scaled area, while the green area is a fixed size area.
If the range is Dorado, you can press and hold the shrit key, and the left mouse button to remove unnecessary points.
Save as * .9.png
When opening the image:
The lines on the left and above are normal. After the processing is completed, you can try it in the code. It's very simple. No code is provided here.
Summary:
The above is the usage tutorial of the 9patch tool, which is very simple,
You can try a few pictures at will.
Or the question, as readers may point out,
O (∩ _ ∩) O thank you!
Ps: That video is a bit noisy. The computer sound card is too junk. Sorry!