//使用Bundle传递数据参数
Intent intent=new Intent();
intent.setClass(MainActivity.this, TwoActivity.class);
Bundle bundle=new Bundle();
bundle.putString("name", "你好");
bundle.putString("pwd", “123”);
intent.putExtras(bundle);
startActivity(intent);
另一个activity取值:
Bundle bundle=this.getIntent().getExtras();
String strName=bundle.getString("name");
String strPwd=bundle.getString("pwd");
txtTitle.setText("欢迎:"+strName+" pwd:"+strPwd);