public class MainActivity extends Activity{
private Button btn;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
btn=(Button)findViewById(R.id.button1);
btn.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
setContentView(R.layout.secondlayout);

}
});


}

 


@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
setContentView(R.layout.secondlayout);

}
});


}

相关文章:

  • 2022-01-09
  • 2022-02-02
  • 2021-06-18
  • 2021-08-08
  • 2022-01-14
  • 2022-12-23
  • 2021-12-27
猜你喜欢
  • 2022-12-23
  • 2022-01-01
  • 2021-04-24
  • 2021-10-11
  • 2021-10-09
  • 2022-01-01
  • 2022-12-23
相关资源
相似解决方案