Activity间通过Intent 传值(值,数组,集合,对象)
Intent i1 = new Intent(this,OtherActivity.class);
i1.putExtra("ont","123"); //传值,值得类型可以是任意的
i1.putStringArrayListExtra(); //传字符串数组
i1.putIntegerArrayListExtra(); //传整型集合
i1.putStringArrayListExtra(); //传字符串集合
i1.putParcelableArrayListExtra(); //传 Parcelable 类型的集合
//创建Bundle
Bundle bundle = new Bundle();
//需要对象实现Parcelable,android自带的,效率高
bundle.putParcelable(); //传Parcelable 对象
bundle.putParcelableArray(); //传parcelable 对象数组
bundle.putParcelableArrayList(); // 传parcelable 集合
//需要对象实现Serializable,java带的,效率没有Parcelable高
bundle.putSerializable(); //传Serialiable 对象
i1.putExtras(bundle); //传Bundle 对象