package lic.swifter.box.util;

import android.content.Context;

/**
 * Created by lic on 16-7-7.
 */
public class DisplayUtil {

    public static int dip2px(Context context, float dipValue) {
        final float scale = context.getResources().getDisplayMetrics().density;
        return (int) (dipValue * scale + 0.5);
    }

    public static int px2dip(Context context, float pxValue) {
        final float scale = context.getResources().getDisplayMetrics().density;
        return (int) (pxValue / scale + 0.5f);
    }
}

@@ -61,16 +61,38 @@
 t;%0A%0A/**%0A
+ * %E5%85%B3%E4%BA%8E%E6%98%BE%E7%A4%BA%E7%9A%84%E5%B7%A5%E5%85%B7%E7%B1%BB%EF%BC%8C%E6%8F%90%E4%BE%9B%E5%8D%95%E4%BD%8D%E8%BD%AC%E6%8D%A2%0A *%0A
  * Creat

add some explanatory note