Following is what px, in, mm, pt, dp, dip and sp stands for and what they means in Android.
px
Stands for : Pixels
It corresponds to actual pixels on the screen.
in
Stands for : Inches
It is based on the physical size of the screen.
mm
Stands for : Millimeters
It is based on the physical size of the screen.
pt
Stands for : Points
It represents1/72 of an inch based on the physical size of the screen.
dp or dip
Stands for : density independent pixel
The density-independent pixel is equivalent to one physical pixel on a 160 dpi (dots per inch) screen. 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). Using dp units to define an application’s UI is highly recommended, as a way of ensuring proper display of UI on different screens. The compiler accepts both “dip” and “dp”, though “dp” is more consistent with “sp”.
sp
Stands for : Scale-independent Pixels
It is like the dp unit, but it is also scaled by the user’s font size preference. It is recommend to use this unit when specifying font sizes, so that it will be adjusted for both the screen density and user’s preference.
Incoming search terms:
- android pt to sp conversion
- convert pt to sp
- difference between dip and px unit in windows
- difference between pt and mm
- difference pt mm
- difference with mm and dip
- what is differance between pt and mm



