[Android] using Draw9patch to make stretched pictures

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.