Android screen adaptation summary, android screen adaptation

Source: Internet
Author: User

Android screen adaptation summary, android screen adaptation

I. concepts that need to be understood first

1. screen size: the screen size of a mobile phone we usually call. For example, Apple's 4.7 inch and glory 6's 5.5 inch. The inch is 1 inch (2.54 cm = ).

Calculation method: screen size = diagonal first size (cm)/2.54 (cm)

 

2. Resolution: The number of pixels displayed on the screen. The larger the number of pixels per unit, the clearer the displayed image.

The resolution is 720*1280, indicating that the horizontal direction of the mobile phone is 720 pixels, and the vertical direction is 1280.

Currently, the mainstream resolution is 480*800,720*1280,108 0*1920.

 

3. Screen density: the number of pixels per inch on the screen.

 

4. Unit:

Px:Pixels, a display is composed of many points, each point is a pixel.

Dp:Andriod is used to describe the size and spacing in development.

Sp:Like dp, it is only used to describe the font size and line spacing.

 

Screen Density Screen level Normal resolution Correspondence  
120 Ldpi (low density)   0.75 1dp = 0.75px
160 Mdpi (medium density) 320*480 1 1dp = 1px
240 Hdpi (high density) 480*800 1.5 1dp = 1.5px
320 Xhdpi (ultra-high density) 720*1280 2 1dp = 2px
480 480 (UHD) 1080*1800 3 1dp = 3px

 

 

Ii. What resolution is used for design?

In principle, different resolutions need to be designed separately. However, due to the various requirements of actual development costs and design costs, you can select models based on the current market share, currently, the main resolutions include 480*800, 720*1280, and 1080*1920. Currently, I use 720*1280 resolution, so far, the market share of 720*1280 is still relatively high. However, due to the continuous improvement in the technical level, we will certainly adopt a 1080*1920 design in the future. I hope you will be able to pay attention to the market situation.

Conclusion: We recommend that you use a resolution of 720*1280.

 

III,How many cut charts are required?

You only need to provide a set of cut charts.

1. Generally, 720*1280 is used. You can directly adapt to a 720*1280 resolution model.

In the 2.720*1280 section, the cropping map resources can be adapted to other models. Some special cropping images must be adapted separately, such as icons.

3. Adapt to the 480*800 model, just cut the image * 0.75.

4. Adapt to the 1080*1920 model, you only need to cut the image * 1.5.

5. When adapting to 1080*1920, do not simply enlarge the icon by 1.5 times. This requires that vector graphics be used to draw images in the case of 720*1280. For example, when the 720*1280 icon is 48px * 48px and the 1080*1920 is applicable, the 48px * 1.5 = 72px. Adjust the vector image to 72px. After you develop the graph splitting resource, the development will put the graph splitting resource in the file directory of xxhdpi separately, and the system will automatically adapt to the 1080*1920 file.

Similarly, if you adapt to 480*800, 48px * 0.75 = 32px, and cut the graph to the development, the development will put the cut graph resource separately under the hdpi directory, it will automatically adapt.

720*1280 graph cutting resources are developed in the xhdpi directory.

 

Note: When designing images, try to use an even number.If the developer can write it directly, try not to cut the graph.

 

IV,How many tags need to be provided?

You only need to provide a set of annotations.

In principle, it is necessary to separate the differences, but due to development costs and other considerations.

Select 720 DPI (resolution: 1280 *) for design. The resolution is 1dp = 2px.

Designers should establish the relative unit concept, and can directly use dp to mark the size and sp to mark the text size;

 

V. Summary

1. 720*1280 resolution is used for design. (Even values are used to facilitate the conversion of dp and px)

2. start tagging. Try to use relative positions for tagging.

3. Cut the image. First, cut the image under 720*1280. The image can be fully adapted to the 720*1280 model. Graph sharding Resource

 

This is an original blog article. For more information, see the source.

Http://www.cnblogs.com/rencm/p/5197140.html

 

 

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.