摘要:
http://heisetoufa.iteye.com/blog/227238 阅读全文
posted @ 2013-03-19 17:59
bavariama
阅读(166)
评论(0)
推荐(0)
摘要:
1 手机px和dp相互转换 /** * 根据手机的分辨率从 dp 的单位 转成为 px(像素) */ public static int dip2px(Context context, float dpValue) { final float scale = context.getResources().getDisplayMetrics().density; return (int) (dpValue * scale + 0.5f); } /** * 根据手机的分辨率从 px(像素) 的单位 ... 阅读全文
posted @ 2013-03-19 17:34
bavariama
阅读(271)
评论(0)
推荐(0)
摘要:
参照以下博客和代码:1http://blog.csdn.net/gf771115/article/details/82372292 http://blog.csdn.net/love_world_/article/details/8426935 RelativeLayout rl = new RelativeLayout(this); Button btn1 = new Button(this); btn1.setText("----------------------"); btn1.setId(1); ... 阅读全文
posted @ 2013-03-19 14:42
bavariama
阅读(21934)
评论(0)
推荐(1)

浙公网安备 33010602011771号