Units in Android

Source: Internet
Author: User

Units in Android

Unit 1, px pixel (pixels) VGA 480*640 pixel (Video Graphics Array) QVGA 240*320 pixel (Quarter VGA) HVGA 320*480 pixel (Half-size VGA) WVGA 800*480 pixels (Wide VGA) WQVGA 400*240 pixels (Wide Quarter VGA) XGA 1024*480 pixels (Extended Graphics Array) 2, dp or dip device independent pixel (device independent pixels) Description: the ratio of dp to pixel density is related to the ratio of dp * density = px, so it has the effect of automatically adapting to the screen. Common density ratio: the density ratio of 240*320 is 0.75eg: 160dp * 0.75 = 120px320*480. The density ratio is: 1.0160dp * 1.0 = 160px316* 800: 1.5160dp * 1.5 = 240px3, sp proportional pixel (scaled pixels-best for text size) Description: used to handle the font size, you can automatically adapt to the user's system font [note] in order to adapt to different resolutions, we recommend that you use dp for different pixel density. in addition to the preceding three display units, we also recommend that you use sp for text: in (inches) inch mm (millimeters) millimeter pt (points) Point, 1/72 inch

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.