public static float spToPx(Resources resources, float sp) {
        DisplayMetrics metrics = resources.getDisplayMetrics();
        return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, sp, metrics);
    }
Change SP to PX

@param resources Resources
@param sp        SP
@return PX
caprice/ui/src/main/java/net/qiujuer/genius/ui/Ui.java