The documentation says that 160 dp (density-independent) equals 1 inch. And 72 pt is also 1 inch. So I don\'t see why android define a dp measurement while it seems to work
I've struggled with dimensions but I think I've found a way of looking at it that makes sense to me. There's a conversion formula in Wei-Meng Lee's "Beginning Android 4 Application Development" (pg 111):
Actual pixels = dp * ( dpi / 160 ), where dpi is either 120, 160, 240 or 320
So, using that formula, I can find which dpi for my phone/emulator is closest to one of those four values and that'll determine the ratio (3/4, 1, 3/2 or 2) used in the formula to convert dp to pixels. It's important to me that dpi in the formula can only assume one of those four values despite the actual device pixel density.
Referring to: http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density, for a Nexus S with a pixel density of 235 dpi the conversion is:
pixels = dp * 3/2
So a 160dp button, say, would be 240px (a little wider than an inch with the device's 235 dpi)
For an HTC Legend, with a pixel density of 181 dpi the formula is:
pixels = dp * 1
(because 181 is closest to 160). So that 160dp button would be 160pixels, or slightly less than an inch on the device with its pixel density of 181dpi.
This helps me understand the incorrectness of the previous Android documentation "1 dp will always equal 1/160in, regardless of screen density".
These are the two main points I'm trying to get in my head :)