The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, which is the baseline density assumed by the system for a ″medium″ density screen.

160dpi 是系统为 mdpi 屏设定的基准密度。

dp 与 px 的换算系数(scale)就是通过设备密度除以基准密度160dpi得来的，是与物理密度无关的。

scale = density / 160
px = dp * scale

The generalized sizes and densities are arranged around a baseline configuration that is a normal size and mdpi (medium) density. This baseline is based upon the screen configuration for the first Android-powered device, the T-Mobile G1, which has an HVGA screen (until Android 1.6, this was the only screen configuration that Android supported).