The first question,. 9 format pictures What's the problem with our previous general picture?
This is a special kind of image in Android development.
This format of the picture in the Android environment has the ability to adjust the size of the adaptive.
(1) agree that the developer defines a scalable area where the content of the expandable area is extended when the image needs to be stretched to fill larger areas than the image itself.
(2) Agree with the developer to define the content display area for displaying text or other content.
Second question, what is the use of the. 9.png format picture?
This is very useful, for example, the simplest way to use is to chat with the picture frame text behind the package background image is used. 9 format of the picture, with the number of words to scale its size, both beautiful and useful!
The third question is such a format cumbersome to use?
Easy to use, thanks to the Draw9patch.bat file under the Tools folder under our Android development, it will help us finish. 9 Format picture Development. but be careful: Use this bat file to be sure to configure the Java environment variables in your computer environment first!
Open the draw9patch.bat file. We can see the following interface
Next click File-open to open the image you want to edit, you can see the following interface
Place the mouse over a white border. Click the left button to drag, the black line appears. A black line indicates that the area can be stretched.
The area covered with no black bars is the same when the picture is stretched (for example, if the corners of the picture are curved, the arcs in the corners do not change when the image is stretched arbitrarily) Suppose the error is more than the selected part. You can hold down the SHIFT key and click the left mouse button to remove the black bar.
Select a good area, click on the left file-"save 9-path, save the picture, suffix named Xxx.9.png,
About Android production. 9.png Pictures