摘要: public class DensityUtil { /** * 根据手机的分辨率从 dip 的单位 转成为 px(像素) */ public static int dip2px(Context context, float dpValue) { final float scale = context.getResources().getDisplayMetrics().density; return (int) (dpValue * scale + 0.5f); } /** * ... 阅读全文
posted @ 2014-04-07 13:02 bingoogolapple 阅读(294) 评论(0) 推荐(0) 编辑