One of the benefits of a scalable bitmap, 9-patch image resource, is that it can use a separate picture element for different UI elements, including buttons, drag bars, backgrounds, and any similar objects, screen backgrounds and button backgrounds that can also be used with this technique
Android comes with a tool, in the SDK Tools directory, there is a draw9patch.bat processing file, right-click, run as Administrator, File/open 9-patch, you can open a picture
Then, tick Show patches check box, in the picture above and to the left there will be a 1-pixel transparent border, you can use the mouse to drag the border to control the zoom range of the picture, you can preview the effect on the right
File/save 9-patch can be saved, save it as ****.9.png, you can use the bitmap as the general picture, @drawable/****;
At this point, the end.
Create a 9-patch custom stretch picture