控件的实例化
Button button1=(Button)findViewById(button1);
setText(1+2);(报错原因,是找不到resid,int代表的是资源的ID)
- setAutoLinkMask(int)
- focusable:聚焦(默认是(true)
- enable:可点击(默认是true)
* gone(消失而不是不显示)
- setMargins
1
2
3
4RelativeLayout.LayoutParams params=new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
params.setMargins(10,10,10,10);
bt.setLayoutParams(params);