Method for making pictures adapt to the size of controls in Android

This requires converting the. PNG image to. 9. PNG, which is the suffix. When installing the Android SDK, it comes with < draw9patch. Bat >, which can edit and save pictures in. PNG format to. 9.png format. This file is stored in the Android SDK Directory - > SDK - > tools directory you installed.

The. 9. PNG format can be adaptive according to the control size in Android, and the most important thing is that it will not be distorted. Isn't it perfect? Here's how to make a progress bar in. 9. PNG format.

The interface after startup is as follows:

First, prepare the PNG image to be converted, and drag the image in, which is the effect shown below

Next, edit the picture

Black points can be selected with the left mouse button and cancelled with the right mouse button

Finally, save the input file name. The suffix tool will help us generate it automatically

Black bars on both sides of the generated picture can be seen on the PC, which does not affect the effect of pasting it on the mobile phone or tablet.

The method of removing the black line is described in Baidu Encyclopedia, Baidu Encyclopedia -9.png

But I haven't tried. Interested friends can try.

The produced picture is just like the usual. PNG.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>