摘要: //px转换成dip public int dip2px(Context context, float dipValue){ final float scale = context.getResources().getDisplayMetrics().density; return (int)(dipValue * scale + 0.5f); } 下面是如何调用:a1.setPadding(a1.getPaddingLeft()+this.dip2px(this, 5... 阅读全文
posted @ 2011-10-09 11:40 QZB 阅读(565) 评论(0) 推荐(1) 编辑