动态设置控件外边距

imageView = new ImageView(this);
LinearLayout.LayoutParams p = new LinearLayout.LayoutParams(20,20);
p.setMargins(10, 0, 0, 0);
imageView.setLayoutParams(p);

posted @ 2013-05-31 11:51  xxdc  阅读(346)  评论(0编辑  收藏  举报