public static float dipToPx(Resources resources, float dp) {
        DisplayMetrics metrics = resources.getDisplayMetrics();
        return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, metrics);
    }
Change Dip to PX

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