Android 屏幕 尺寸 单位
2011-07-14 13:57
435 查看
px
Pixels - corresponds to actual pixels on the screen.
in
Inches - based on the physical size of the screen.
mm
Millimeters - based on the physical size of the screen.
pt
Points - 1/72 of an inch based on the physical size of the screen.
dp
Density-independent Pixels - an abstract unit that is based on the physical density of the screen. These units are relative to a 160 dpi screen, so one dp is one pixel on a 160 dpi screen. The ratio of dp-to-pixel will change with the screen density, but not necessarily in direct proportion. Note: The compiler accepts both "dip" and "dp", though "dp" is more consistent with "sp".
sp
Scale-independent Pixels - this is like the dp unit, but it is also scaled by the user's font size preference. It is recommend you use this unit when specifying font sizes, so they will be adjusted for both the screen density and user's preference.
Pixels - corresponds to actual pixels on the screen.
in
Inches - based on the physical size of the screen.
mm
Millimeters - based on the physical size of the screen.
pt
Points - 1/72 of an inch based on the physical size of the screen.
dp
Density-independent Pixels - an abstract unit that is based on the physical density of the screen. These units are relative to a 160 dpi screen, so one dp is one pixel on a 160 dpi screen. The ratio of dp-to-pixel will change with the screen density, but not necessarily in direct proportion. Note: The compiler accepts both "dip" and "dp", though "dp" is more consistent with "sp".
sp
Scale-independent Pixels - this is like the dp unit, but it is also scaled by the user's font size preference. It is recommend you use this unit when specifying font sizes, so they will be adjusted for both the screen density and user's preference.
相关文章推荐
- android屏幕及尺寸单位
- Android计量单位px,in,mm,pt,dp,dip,sp和获取屏幕尺寸与密度
- Android 屏幕适配攻略(二)单位dp与px来表示控件的尺寸
- Android计量单位px,in,mm,pt,dp,dip,sp和获取屏幕尺寸与密度
- Android开发中:屏幕尺寸、密度及尺寸单位的经验
- 再次了解android中屏幕尺寸,单位等
- Android常见分辨率(mdpi、hdpi 、xhdpi、xxhdpi )尺寸单位转换和屏幕适配相关
- Android屏幕尺寸单位/屏幕适配
- Android屏幕宽高获取和尺寸单位
- Android 尺寸单位 屏幕适配
- Android 尺寸单位转换和屏幕适配相关
- Android 屏幕尺寸和密度单位解读
- Android常见分辨率(mdpi、hdpi 、xhdpi、xxhdpi )尺寸单位转换和屏幕适配相关
- Android 尺寸单位转换和屏幕适配相关
- Android 尺寸单位转换和屏幕适配相关
- Android 尺寸单位转换和屏幕适配相关
- Android 尺寸单位转换和屏幕适配相关
- Android 尺寸单位转换和屏幕适配相关
- Android 屏幕尺寸单位
- Android计量单位px,in,mm,pt,dp,dip,sp和获取屏幕尺寸与密度