Possible Duplicate:
Difference of px, dp, dip and sp in android
I am new to Android and I was trying out this tutorial
In that tutorial, they used the unit “sp” for textSize attribute and “dp” for other attributes.
Please tell me how sp differs from dp?
The
dphas constant ratio transition topx:dp = px * ratio. Whereratiowill never change on any particular device.While
sp(s for scaled) has scalable ratio:sp = px * ratio * scale. Whererationever changes, butscaleis user configurable. Thisscalecan be used by people who need larger font sizes, for example, to use device more comfortably.