The dimension units defined in Android include the following:
Px (pixels, pixels): corresponds to the actual pixels on the screen.
In (inches, inches): The physical length unit of the screen.
Mm (millimeters, mm): physical length unit of the screen.
Pt (points, lbs): physical length unit of the screen, 1/72 inch.
DP (density-independent pixels): the unit of logical length. On a 160 DPI screen, 1dp = 1px = 1/160 inch. As the density changes, the number of corresponding pixels also changes, but there is no direct change ratio.
Dip: it is the same as DP and is mostly used in Google examples.
SP (pixels unrelated to density and font ZOOMING): similar to DP, but can be scaled based on your font size preferences.
Use DP as the unit of space size and SP as the unit of text size.
Reference: detailed explanation of Android length units (DP, SP, PX, In, PT, mm, DIP)