Screen Size related concepts

Source: Internet
Author: User

* Screen Size: Length of screen diagonal
    
* Resolution: The number of pixel points in 2 directions, common value 480X800, 320X480
    
* dpi:dots per inch, pixel density, which is the number of pixels per inch.
    
* Calculation method: Screen resolution/Screen physical size
        
* If you have a phone, the physical size of the screen is 1.5 inches x2 inches, the screen resolution is 240x320, the pixel density is 240/1.5=160dpi (landscape) or 320/2=160dpi (portrait), 160DPI is the pixel density of this phone. This value is the same for both landscape and portrait, because most phone screens use square pixels (except of course, a wonderful screen).
        
* Android Common pixel density: ldpi (MDPI), hdpi (x), xhdpi (320), their corresponding DP to PX coefficients are 0.75, 1, 1.5 and 2, this factor multiplied by the DP length is the number of pixels.
        
* For example, the interface has a length of "80dp" picture, then it is actually displayed as 80x1.5=120px on the 240dpi phone, on the 320dpi phone actually displayed as 80x2=160px
        
* px: pixels. 1px represents a physical pixel point on the screen
    
* dip/dp:density independent pixels, the device independent pixel point, and pixel density.
    
* on MDPI's cell phone, 1dp=1px
* on HDPI's cell phone, 1dp=1.5px
* on XHDPI's cell phone, 1dp=2px

* Sp:scale-independent Pixel, an abstract pixel independent of scale. Similar to DP, specifically used to identify text


* * Conclusion: On Android, the description text size is used SP, the other is used dp**

From for notes (Wiz)

Screen Size related concepts

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.