Android device compatibility (1)

Source: Internet
Author: User

Reference: Android official website > Development > API Guide > Introduction > Device compatibility

1. Basic Concepts

Android is designed to run on a variety of different types of devices, such as mobile phones, tablets, and TVs. For developers, a huge number of devices provide a huge potential audience for your app. In order for your app to run successfully on these devices, your app should be able to tolerate the differences in some hardware features and provide a flexible user interface that can be adapted to a different screen configuration.

Compatible feature limits (Google Play Store):

    • Device features
    • Platform versions (Platform version)
    • Screen configuration
2. Screen Fit 3. Concept

Screen Size: The physical size of the diagonal of the phone. The common dimensions are 5-inch, 5.5-inch, 6-inch and so on, 1-inch =2.54cm.

Screen resolution: wide and high pixels. Common resolutions: 320x480, 480x800, 720x1280, 1080x1920.

Screen density: pixel density per inch.

Dpi:dots per ICH assumes that there are 160 pixels per inch in the device, then the device's screen pixel density is =160dpi.

Density type represents the resolution (PX) screen pixel density (dpi)
Low Density (ldpi) 240x320 120
Medium Density (MDPI) 320x480 160
High Density (hdpi) 480x800 240
Ultra high Density (xhdpi) 720x1280 320
Ultra high Density (xxhdpi) 1080x1920 480

Density-independent pixels:

    • Meaning: Density-independent pixel, called DP or DIP, is independent of the actual physical pixel points on the terminal.
    • Unit: DP, which guarantees the same effect on devices with different screen pixel densities

Density type represents the resolution (PX) screen Density (dpi) conversion (PX/DP) proportions
Low Density (ldpi) 240x320 120 1dp=0.75px 3
Medium Density (MDPI) 320x480 160 1dp=1px 4
High Density (hdpi) 480x800 240 1dp=1.5px 6
Ultra high Density (xhdpi) 720x1280 320 1dp=2px 8
Ultra high Density (xxhdpi) 1080x1920 480 1dp=3px 12

Independent proportional pixels:

    • Meaning: Scale-independent pixel, called sp or SIP
    • Unit: SP
      1. Android Development uses this unit to set the text size, which can be scaled according to the font size preference
      2. Recommended to use 12SP, 14SP, 18SP, 22sp as the size of the font settings, do not recommend the use of odd and fractional, easy to cause the loss of precision; fonts smaller than 12sp can be too small for users to see clearly

Android device compatibility (1)

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.