This article discusses the following two topics around. 9.png format pictures:
1. Features of the format picture
2. How to Make
I. Features of the file in 9.png format
Compared to the traditional PNG format picture, the 9.png format picture has a circle of dots around the picture, which is used to define the expandable area of the picture and the content display area.
Images of this format have the ability to adjust the size of the Android environment with adaptive sizing.
(1) allows developers to define extensible areas 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) Allows developers to define content display areas for displaying text or other content
As shown in the following:
Extend the area by intersecting the black lines on the left and top
The right and bottom part of the black line crosses the content display area
Second, the production of 9.png pictures
The tools folder of the Android SDK provides a tool for making this format picture Draw9patch.bat
After you open any picture with this tool, place the mouse over the picture, as shown in the main screen:
A black overlay is a non-editable (locked) area with an editable area around the edge of one pixel.
Press and hold the left mouse button to draw an expandable area on the left and top edges
Draw the content display area on the right and bottom, and the results are as follows:
After you finish drawing, select File-> Save to save the file in. 9.png format and use it in your Android project.
Features and production of Android 9 patch pictures (. 9.png format Picture) (RPM)