android Intent

 

 

跳转

Intent intent=getIntent();             
intent.setClass(BarJudgeActivity.barJudgeActivity,BundlePhysiActivity.class);
intent.putExtra("name","liu");//
intent.putExtra("age",18);
BarJudgeActivity.barJudgeActivity.startActivity(intent);

接收

Intent intent = getIntent();
String name = intent.getStringExtra("name");
int age= intent.getIntExtra("age",0);//如果age无数据,则取后边的数据

 

posted @ 2019-01-08 14:26  富坚老贼  阅读(136)  评论(0编辑  收藏  举报