For android .9.png images, click 9 in Chinese for short,

Source: Internet
Author: User

For android .9.png images, click 9 in Chinese for short,

Because the project requires screen adaptation, and many of them are original images, they are all pulled from other programs, and now many of them are their own, so you must consider how to do it, make sure that the layout is not messy.

Not much nonsense. The method of making a piece of film can avoid too many detours.

In fact, the android sdk has image production tools. If it is used by the artist, you also need to configure the java environment. If it is not configured, it seems that it is not usable, that is, the problem of android programming tools.

Now Google has announced that it will not update adt, ddms, and so on, so we should continue to learn how to use android studio. Another point is that android studio can be used to produce .9.png images.


Double-click to open this tool


On the left is the source image, and on the right is three images. The top is vertical stretching, the middle is horizontal stretching, and the bottom is amplification. For this image, it is png now, if it is set to, the length of the vertical direction cannot be changed, and the horizontal direction can be reduced. This is relatively simple, in addition, let's talk about the problem of the Black edge location at. Why does the Black edge location affect the layout?

Is In The jiugongge format, but the self-perception is incomplete. First of all, in simple terms, the image will be stretched. Now we will give you an example with a prepared image, this will deepen your understanding.


First of all, I think it's a Black edge. Let's take a closer look at the fact that the added Black edge is asymmetrical, and that is, although it is necessary to ensure that the rounded corner cannot be stretched or deformed, but why does the right side and the bottom side all add, and the left side and the top side are not all added, this design is a problem, that is, what is stretched, where is shown, I checked the information. I stretched the Black edge on the left side and the upper side, and showed the lower side and the right side. I believe you can understand it, all the display items must be displayed, but the rounded corner cannot be stretched. In this case, the corner will be deformed. Therefore, the left side and the top side cannot be covered, then the new problem arises. Generally, the stretched image is used as the background. If a font or image is added to the layout, what will happen to the Black edge, okay. Let's take a look.


This is shown in as. In this way, you can think about why there are three colors, and the nine cells are like this. I believe you can understand it. First of all, areas without shadow coverage are not stretched and displayed as is, while areas with a lighter shadow (including the heaviest areas in the beta test) need to be stretched, so what is the heaviest area used for? Now we should know that it is used to place its own font or relative position of the image. Now it is solid color, so what should I do if it is not a solid color (gradient, need to be stretched )?


If it is a particularly complex color, then you can add a Black edge to the white without background for stretching. The right side is the result of stretching, so the relative length, width, and height ratio remains unchanged.

Now, I can only understand the limited capabilities of bloggers. If you have any mistakes, please correct me.

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.