How big is small, normal, large and xlarge?

后端 未结 3 703
孤独总比滥情好
孤独总比滥情好 2021-02-07 04:50

I know that there is a section in http://developer.android.com/guide/practices/screens_support.html about the categories of the physical screen sizes but the diagram is very rou

相关标签:
3条回答
  • 2021-02-07 05:20

    In my experience, there are no "specific limits" to the screen sizes using the small, normal, large, x-large notation. They are more general and will get you by in the majority of cases. These values are part of the rom on the device, so it's up to the manufacturer to conform to the standards in the API documentation or not.

    If you are targeting API 13+, you can use the sw-dp notation to get more specific (see http://developer.android.com/guide/practices/screens_support.html#DeclaringTabletLayouts).

    0 讨论(0)
  • 2021-02-07 05:33

    The Android Compatibility Definition only states that devices have to be greater than 2.5". It does however also require compliance with the multiple screens support doc so while these sizes are rough (as you pointed out) this is all you can rely on and probably the best information you'll get. I believe Google is intentionally being vague here. You (as a developer) should not need to worry about exact physical screen size.

    0 讨论(0)
  • 2021-02-07 05:34

    To elaborate on John Boker's answer...

    xlarge screens are at least 960dp x 720dp
    large screens are at least 640dp x 480dp
    normal screens are at least 470dp x 320dp
    small screens are at least 426dp x 320dp
    

    And since 160dp approximately equals 1in on every device:

    Density-independent Pixels - An abstract unit that is based on the physical density of the screen. These units are relative to a 160 dpi (dots per inch) screen, on which 1dp is roughly equal to 1px.

    http://developer.android.com/guide/topics/resources/more-resources.html#Dimension

    The physical sizes can be calculated approximately as follows:

    xlarge screens are at least 6in x 4.5in
    large screens are at least 4in x 3in
    normal screens are at least 2.9375in x 2in
    small screens are at least 2.6625in x 2in
    
    0 讨论(0)
提交回复
热议问题