Java tutorial
//package com.java2s; import android.util.DisplayMetrics; import android.util.TypedValue; public class Main { public static float sp2Px(float sp, DisplayMetrics metrics) { return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, sp, metrics); } }