ninepatchdrawable painting is a scalable bitmap image, Android will automatically resize to accommodate the displayed content. An example is the Ninepatch for the background, using the standard Android button, the button must be scaled to accommodate the length of the changed characters
Ninepatchdrawable is a standard PNG image that includes an extra 1 pixel boundary, and you must save it with a suffix of. 9.png and remain in the engineering res/drawable directory. If you are extracting the *.9.png file from the APK, note that it has been removed from the surrounding blank pixels and must be added when used.
This boundary is used to determine the scalable and static area of the image. You can draw one or more black 1 pixels on the left and top of the line to point out the retractable part (you can need a lot of retractable parts), its relative position is the same in the scalable part, so the large part is always very large.
You can also draw an optional drawable area on the right and bottom of the image (valid, inner margin lines). If your view object is set Ninepath to the background and then specify a special view font, it will flex itself so that all the text adapts to the area (if any) that is designed according to the right and bottom lines, and of course the inner margin line does not include it, and Android can use the line on the left to define a Drawable area.
Let's clarify the two different lines, the left and top lines to define which pixels of the image are allowed to be copied when scaling.
The bottom and right lines are used to define an image in a relative position, and the contents of the view are placed in it.