1.声明控件参数获取的对象
LinearLayout.LayoutParams linear = (LayoutParams) view.getLayoutParams();
2.设置控件参数,如宽度:
linear.width = 10;
3.使得设置生效
view.setLayoutParams(linear);
注意:view表示的是对应的控件对象
posted on 2012-03-01 11:29 delia 阅读(192) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 delia Powered by .NET 8.0 on Kubernetes