Android五种数据传递方法汇总 - 拙言的专栏 - 博客频道 - CSDN.NET
- //传递些简单的参数
- Intent intentSimple = new Intent();
- intentSimple.setClass(MainActivity.this,SimpleActivity.class);
- Bundle bundleSimple = new Bundle();
- bundleSimple.putString("usr", "xcl");
- bundleSimple.putString("pwd", "zj");
- intentSimple.putExtras(bundleSimple);
- startActivity(intentSimple);
- //接收参数
- Bundle bunde = this.getIntent().getExtras();
- String eml = bunde.getString("usr");
- String pwd = bunde.getString("pwd");