Button r=new Button(this); 就出错,不知道什么原因?该怎么处理
Button r=new Button(this); 就出错,不知道什么原因?
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//TableLayout MainT =(TableLayout) this.findViewById(R.id.MainT);
Button r=new Button(this);
// LoadMainT(MainT,this);
this.setContentView(R.layout.main);
}
------解决方案--------------------
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//TableLayout MainT =(TableLayout) this.findViewById(R.id.MainT);
Button r=new Button(this);
// LoadMainT(MainT,this);
this.setContentView(R.layout.main);
}
------解决方案--------------------