代码设置view 的margin属性示例如下:
View _dot = new View(this);
LinearLayout.LayoutParams _lp = new LinearLayout.LayoutParams(5, 5);
_lp.setMargins(5, 0, 5, 0);
_dot.setLayoutParams(_lp);
代码设置view 的margin属性示例如下:
View _dot = new View(this);
LinearLayout.LayoutParams _lp = new LinearLayout.LayoutParams(5, 5);
_lp.setMargins(5, 0, 5, 0);
_dot.setLayoutParams(_lp);