px2sp

fun px2sp(pxValue: Float): Float

Converting px to sp.

The DisplayMetrics.scaledDensity is deprecate from Build.VERSION_CODES.UPSIDE_DOWN_CAKE, click scaledDensity to get more information.

Return

a sp value.

Parameters

pxValue

a px value.