Android Screen Size related knowledge

Source: Internet
Author: User

this article by Purplesword (jzj1993) original, reprint please specifyOriginal URL http://blog.csdn.net/jzj1993
1.px = Pixels, pixel value
2.DP = Dip = device independent pixel, unit independent pixel (Android dedicated virtual pixel unit)
3.density, screen density
(1) approximate conversion relationship px = dip*density, dip = px/density
(2) the same pixel value (px) of the control, on different density screen, the display effect is large, so the control size is usually defined with a dip

4.densityDpi, how many px pixels per inch
(1) The value is an approximate value. such as Huawei Glory 3c,1280*720 pixels, diagonal pixels about 1468.6, diagonal actual size of 5 inches, the actual dpi of about 294, while the measured densitydpi value of
(2) Most phone screens use square pixels, with the same horizontal and vertical dpi
(3) depending on the size of the densitydpi, decide which folder to call the picture resource under: ldpi is 120dpi,mdpi is 160dpi,hdpi is 240dpi,xhdpi is 320dpi
(4) Conversion Relationship density = densitydpi/160, for the densitydpi screen, density = 1, at which px = Dip

5. Resolution: px pixels per inch in dpi (but often inaccurate to refer to the total number of pixels in the image)
6.sp = scaled pixels, for font size
7.scaledDensity Text zoom factor
(1) conversion relationship: SP = px/scaleddensity, px = sp* scaleddensity



Android Screen Size related knowledge

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.