DP (DIP): device independent pixels (unit independent pixels). Different devices have different display effects, this is related to the device hardware, generally we support WVGA, HVGA and QVGA recommend this, do not rely on pixels.
Px:pixels (pixels). Different devices show the same effect, generally we hvga represent 320x480 pixels, this use more.
Pt:point, is a standard length unit, 1pt=1/72 inches, for the printing industry, very simple to use;
sp:scaled pixels (enlarge pixels). Mainly used for font display of best for textsize.
Thus, according to Google's suggestion, TextView's font size is best to use SP to do units, and view the source of TextView know that Android by default using the SP as the font size units.
Also, the Google code inside the units used in the PX as the default unit.
Comparison of pixel units DP, PX, PT, SP in Android