The Android documentation for supporting multiple screen sizes says:
The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, the baseline density assumed by the platform (as described later in this document). At run time, the platform transparently handles any scaling of the dp units needed, based on the actual density of the screen in use. The conversion of dp units to screen pixels is simple: pixels = dps * (density / 160). For example, on 240 dpi screen, 1 dp would equal 1.5 physical pixels. Using dp units to define your application’s UI is highly recommended, as a way of ensuring proper display of your UI on different screens.
Confused? Try this. Take the example of two screens that are the same size but one has a resolution of 160 dpi (dots per inch, i.e. pixels per inch) and the other is 240 dpi.
|Lower resolution screen||Higher resolution, same size|
|Physical Width||1.5 inches||1.5 inches|
|Dots Per Inch (“dpi”)||160||240|
|Density (factor of baseline 160)||1.0||1.5|
|Density-independent Pixels (“dip” or “dp” or “dps”)||240||240|
|Scale-independent pixels (“sip” or “sp”)||Depends on user font size settings||same|
Notes: Density does not exactly follow the real screen size, pixels are not necessarily squares, there is no strict definition for what a “pixel” means. This may be confusing but not as much as CSS Units (em, ex, pt, etcetera).