Usage of images in Android

Source: Internet
Author: User

1. What is a. 9 file?
Images in 12.169.png format are newly created on the Android platform, which is stretched but distorted. 2. Compared with traditional PNG images, a 9.png image consists of a circle of pixels around the image to form the border edge. This edge is used to define the border area and content display area of the image.

Ii. What are the characteristics of. 9 files?
Format: The resize image has the adaptive resizing capability in the android environment.
2. 9 format: Images allow developers to define scalable areas. The content of the expanded area is extended when an image needs to be extended to fill areas larger than the image itself.
3. The. 9 format picture allows developers to define the content display area for displaying text and other content.
4. The. 9 format uses a very small amount of resources. Generally, a picture of a few Kb quit is converted into several hundred bytes, which helps to save traffic and increase loading speed. Note the image size definition: After the ghost image is packaged, it will become 21x21 pixels. Therefore, we should be aware of the size when making the license. Note: Configure Java environment variables:
This should be explained in detail. For more information, see: JDK installation diagram non-environment variable settings.

3. How to Create a. 9 file?

Obtain the draw9patch. Bat tool. 1. You can obtain the. 9 Format Image Watermark tool draw9patch. bat from the android SDK Development Tools Folder.

Obtain method 2. Download draw9patch.zip from the Internet and execute draw9patch. bat.

 

Open a PNG Image

 

The black and red stripes in the middle indicate that the image cannot be edited. The white transparent border on the edge indicates that the border is added with a pixel border.

Note: If you have selected more mistakes, you can press the Shift Key + Click the left mouse button to remove the black bar, or right-click it to remove it.
Save: After selecting a region, click File-> Save 9-pathon the top left to save the image with the suffix xxx.9.png. The image can be used in the project.

 

Transfer from http://www.apkbus.com/anzhuo bus network ~

 

 

Related Article

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.