利用安卓自带Bundle或者Intent对象封装数据即可,代码如下:
Intent i=new Intent(MainActivity.this,Second.class);
Bundle bundle=new Bundle();
bundle.putString("name","里斯");
bundle.putInteger("age",25);
i.putExtra("uerData",bundle);
startActivity(i);
利用安卓自带Bundle或者Intent对象封装数据即可,代码如下:
Intent i=new Intent(MainActivity.this,Second.class);
Bundle bundle=new Bundle();
bundle.putString("name","里斯");
bundle.putInteger("age",25);
i.putExtra("uerData",bundle);
startActivity(i);