You will need to have ValueActivity
implement Parcelable
interface and you will need to implement writeToParcel()
the CREATOR
and a suitable constructor that takes a Parcel
as argument. See the documentation of Parcelable
interface.
To put the list into the Bundle
, use:
bundle.putParcelableArrayList("list", list);
To get the list out of the Bundle
in the target activity, use:
List<ValueActivity> = listbundle.getParcelableArrayList("list");
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…