首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

Button r=new Button(this); 就出错,不知道什么原因?该怎么处理

2012-03-12 
Button rnew Button(this) 就出错,不知道什么原因?@Overridepublic void onCreate(Bundle savedInstance

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);
   
  }

[解决办法]

探讨

// LoadMainT(MainT,this);
this.setContentView(R.layout.main);
Button r=new Button(this);

颠倒一下顺序应该就没事了

热点排行