android--display the difference between units px and dip and SP

Source: Internet
Author: User
Dip:device independent pixels (device independent pixels). Different devices have different display effects, this is related to the device hardware, generally we support WVGA, HVGA and QVGA recommend this, do not rely on pixels.

Px:pixels (pixels). Different devices show the same effect, generally we hvga represent 320x480 pixels, this use more.

Pt:point, is a standard length unit, 1pt=1/72 inches, for the printing industry, very simple to use;

mainly used for font display of best for textsize.

As a result, according to Google's advice,TextView's font size is best to use SP to do units , and view
TextView
The source shows that Android uses the SP as the font size unit by default.




Citation: http://zhidao.baidu.com/link?url=4Vh3086dimqAXsPj-loafMwhexoBHu5yfvCp4fHa3euVg4bF52NMJoEXLgj6KBf8meDTFvgd5GuzD8jM2FcP9q

android--display the difference between units px and dip and SP

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.