Android. 9 image production and usage summary,

Source: Internet
Author: User

Android. 9 image production and usage summary,

1. 9 The purpose of an image can be to specify the stretching and content areas. If no image is set, the image will be stretched proportionally, and all images will be scaled up and down equally. It can save the image size and mainly set the stretching and content areas. The original image can have many duplicates.
Ii. 9 directory of the image production tool: sdk/tools/draw9patch. bat. Draw a black line and move the cursor to China East. Delete the black line and press shift to remove the black line. For details about how to use the draw9patch tool, see red lines in Android API 18.
Iii. Description 1. up and left indicate stretching (horizontal and vertical) 2. right and bottom indicate the content area. You can add padding through the content area (for example, TextView background settings. 9. If only the middle part of the bottom is black, the left and right sides of the bottom are not marked. the content is displayed.) 4. for non-dimensional. 9 The picture is also different, because the picture is not in the dot area, different screens are also different, the film 5px, in the high score or split is not stretched 5. you can draw multiple lines in the stretch area of an image. However, it is invalid to draw multiple lines in the content area. 6. The. 9 image in the generated apk package has no black lines on the left and right. You can use apktool to decompile and view the black line effect.

Iv. FAQs. 9. After the image is set as the background, you can see the black lines on the mobile phone. the format of the image file is not .9.png. 9 will cause this exception 2. the black background is not completely transparent, with edges or flaws
FAQ about content dashes-the content displayed in the background view is strange. You can check whether the content area on the right and bottom of the image is incorrect.
FAQs about stretch strip-after the rounded corner is drawn to the stretched line, the image has a margin or blur in the rounded corner. The reason is that the rounded corner is composed of many particles, if the image cannot be viewed in hours. If the image is stretched 100 times, many mosaic blocks will be displayed in the original rounded corner. The rounded corner cannot be stretched.

V. References: official documents Android Learning Series (4) -- App adaptive draw9patch without distortion background



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.