In Android, how do I design image resources required by applications for mobile phones of different screen sizes? -Zhihu

Source: Internet
Author: User
X can be interpreted as hdpi according to the mobile phone screen standard, 480x320 is mdpi, and 320x240 is ldpi. According to the latest data, hdpi and mdpi of all Android mobile phones account for a ratio of more;


System Version, up to 2.1 ~ The proportion of 2.3 is also an absolute proportion. We can use this as the basis for adaptation. we need to pay attention to this data at any time, especially in the months after the launch of a new version of Android, market changes are expected to be more active. It is worth noting that this proportion is only the current data and may change in the future. Therefore, we need to adapt the facts to the new market environment.


Answer Question 1: Taking the current situation as an example, if it is the most economical, we generally consider designing hdpi and mdpi image resources when developing Android apps. Therefore, we also need to design two sets of images, many of them use a set of hdpi image resources to save the workload and compress them directly when using mdpi, which results in a high loss of image quality. Therefore, we 'd better use two sets of resource images as much as possible;


Question 2: When visual design is based on the interaction prototype, you can consider the mdpi, that is, the 320x133 blueprint for design, because Android generally uses DP as the unit, in our design, PX is usually the unit, which involves a unit conversion problem. In mdpi, the relationship between PX and DP is, in this way, the unit conversion can be easily performed when the coordinates are marked. For example, if we use 320x133 as the blueprint, the distance measured in Photoshop is 10px, we can directly mark the coordinates of the RD as 10dp. Because the unit of DP is that the program can adapt to the screen without DPI, even if three sets of different DPI images are designed, generally, coordinates are located only on the mdpi design drawing. The coordinates can be used for all DPI resources;


Because Android now supports xhdpi (similar to the 960x640 resolution of iPhone 4). If we have four sets of image resources (xhdpihdpi/mdpi/ldpi) with different DPI, because the first DPI design is based on mdpi, we set the ratio of mdpi to 1, and the proportional relationship between different DPI image resource sizes can be Xhdpi: hdpi: mdpi: ldpi =.. 75That is to say, the first set of images is the mdpi resource image. xhpi can be adjusted to 200%, hdpi can be adjusted to 150%, and ldpi is 75%;


Answer question 3: In visual design, as mentioned above, you can design a set of X values first. When different DPI specifications are used, you can design all the controls used by all apps in the PSD of 320x8.0 as a separate PSD of the control library. All the control layers of the PSD are drawn based on the shape tool, each resolution is used as the PSD of the control library. Then, the artist can directly cut the PSD of the control library to RD. After the psd of the mdpi control is completed, the PSD of other DPI control libraries can be adjusted according to the proportional relationship mentioned above. For example, the PSD of hdpi controls is to enlarge each control in mdpi to 150%, sometimes the image in the PSD is enlarged and reduced with some translucent virtual edges, which can be slightly adjusted. If you design the mdpi, the size of each control can be divisible by four as much as possible, in this way, you can directly zoom in or out the control size without worrying about the virtual edge. Of course, it cannot be completely restricted in the dead end where the size is divided by four, which also easily limits the visual design, after the visual design is complete, you can try to adjust it as much as possible. The overall interface, for example, is not suitable, or affects the visual design.

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.