Android program ape How to Bubble design Girl's quick master DP and PX can be

Source: Internet
Author: User

Believe that a lot of Android program Ape has been around the design of the sister watering, then how to win the favor of the design sister, learn this article can be.
Program apes and UI designers to discuss design drafts and transduction, often because of the DP and PX issues of unpleasant, here can be analyzed for two reasons:

1, the program Ape reason, do not understand the conversion relationship between DP and PX. including me, and most of the development I have seen, more often than not very concerned about how DP and PX come, and how to convert, only know Master general situation with DP, font size with SP, draw line with PX.

2, design sister reasons, design not out of DP label, or even do not know what DP is. Most companies do not specialize in a design for Android, only one version of the iOS design, and iOS design is labeled with PX, and because of the first reason above, the Android program Ape also do not understand how many of the PX should use DP.

Below we will use the simple way to enhance the program ape and the design sister sentiment!

First, we need to understand this picture:

This list of the current Android development Common 5 kinds of dpi,dpi refers to pixels per inch (for example: a wide is 1.5 inches 240 pixels, high is 2 inches 320 pixels of the phone's dpi is: 240px/1.5in=320px/2in=160dpi, Both diagonal pixels per inch), above this table is also less one, is ldpi, is the mdpi 0.75 times times, that is, 120DPI.

The following chart is the main screen for various DPI-related phones:

Please calculate the screen dpi separately according to the formula in the diagram below. In mdpi, Dp/pixel = dpi/160, which is 1dip equivalent to 1 pixels in a device with a DPI of 160. So in xhdpi 320dpi, 1DP is equivalent to 2 pixels (again, be sure to calculate with a calculator ah, and dpi is the pixel density on the diagonal).

General design sister out of the picture will be xhdpi, both to take care of iOS, but also to take care of Android. Since it is a xhdpi, we can use 1dp=2px to deal with the design of the girl's label. If it is not a xhdpi diagram, you can also follow the 0.75:1:1.5:2:3:4 this ratio to convert.

Help here, the rest depends on your repair.

Let me give you a few more common values:
Launcher ICON:48DP*48DP
Action Bar ICONS:32DP*32DP
Small ICONS:16DP*16DP
Notification ICONS:24DP*24DP
If you are not satisfied with this, then give you a picture, package your satisfaction:

Content reference and networking and android.com
If you can't open it, see here "one of the programmer's weapons VPN"

Android program ape How to Bubble design Girl's quick master DP and PX can be

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.