One, px
Pixel pixels | Not resolved
Second, DPI
dpi (dots perinch): dots per inch, that is, screen diagonal pixel value ÷ inch value
For example, 480x800 resolution 4.0-inch mobile phone computing dpi=
Third, DP
DP (same as DIP): 1DP = 1px on a monitor 160 dots per inch, px = DP (dpi/160)
Suppose two screen size, the screen one DPI value is twice times the right, if the screen a DPI of 160, the screen two DPI is 320, set 160DP case
Screen One: 160PX=160DP (160dpi/160) Screen II: 320PX=160DP (320dpi/160)
Depending on the relationship, it can be concluded that:
Screen a control length of 160px, screen two control length of 320px, so that the length of the control to adapt to different screen size, with DP very suitable.
Four, SP
SP (scaled pixels) is typically used to specify the font size, and the SP changes when the user modifies the phone display font
More:
Http://www.cnblogs.com/cmduan/archive/2012/03/09/2388345.html
Android: Layout Unit conversions