A basic concept
1. DPI (dots per inch) of how many dots each, and PPI (Pixel per inch), pixel pixels. For the design of the display, Dpi=ppi.
2. Dip (device independent pixels) devices independent pixels, different devices have different display effect, this is related to the device hardware, do not rely on pixels.
3. DP (density-independent pixel), an abstract unit based on screen density. 1DP = 1px on a monitor 160 dots per inch.
4. PX (pixels) pixels are the actual pixel units on the screen.
5. SP (scale-independent pixels), it is the font unit of Android, the 160PPI screen as standard, when the font size is 100%, 1sp=1px.
Two calculation methods and conversion
dpi=√ (length pixels ²+ width pixels ²)/Screen diagonal inches
Conversion formulas for DP and PX:
dp*ppi/160 = px. such as 1DP x 320ppi/160 = 2px.
Conversion formula for SP and PX:
sp*ppi/160 = px
Http://www.cnblogs.com/halbertsun/p/4901724.html
UI interface Control Size conversion