How to adjust the size of an image adaptive control in Android

Source: Internet
Author: User

In Android, You can automatically switch between the horizontal and vertical screens, and have different sizes of resolutions. How can you adapt an image to the above requirements? In this case, convert the. PNG format image into a. 9.png format, and. 9.png is the suffix name. <Draw9patch. bat> is provided when the Android-SDK is installed. You can save the image in the. PNG format and change it to the .9.png format. This file is stored in the Android-SDK directory you have installed-> sdk-> tools directory. The .9.png format can be adaptive to the control size in Andriod. The most important thing is that it will not be distorted. Is it perfect? The following figure shows the progress bar in the .9.png format. The startup interface is as follows: first, prepare the png image to be converted, and drag the image into it. In the following figure, you can click the left mouse button to select the Black Point for editing the image, right-click to cancel and save the input file name. The suffix tool will automatically generate the generated image and view the black lines on both sides on the PC, this does not affect the effect of attaching to a mobile phone or tablet. The hacker who wants to remove the black line has a description on the hundred degrees Baike, hundred degrees Baike -9.png, but I have not tried it. If you are interested, you can try it. Just like using .png.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.