Smallest Width for Galaxy S and Galaxy S2

浪子不回头ぞ 提交于 2019-11-30 20:34:39

Screen density, as defined by the reference material is:

The quantity of pixels within a physical area of the screen; usually referred to as dpi (dots per inch). For example, a "low" density screen has fewer pixels within a given physical area, compared to a "normal" or "high" density screen. For simplicity, Android groups all actual screen densities into four generalized densities: low, medium, high, and extra high.

low = 120dpi med = 160dpi high = 240dpi xhi = 320dpi

So the Galaxy SII, with a real density of 218, gets assigned a "high" density of 240 in dp calculations. Thus the width of the screen in dp is 480/240*160 = 320.

This sucks, I agree. But it's how it works.

http://developer.android.com/guide/practices/screens_support.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!