Android examples for Android OS:Parcel
put Parcelable List to Bundle
//package com.java2s; import android.os.Bundle; import android.os.Parcelable; import java.util.ArrayList; import java.util.List; public class Main { @SuppressWarnings("unchecked") public static void putParcelableList(Bundle bundle, List<? extends Parcelable> list, String key) { if (list == null) { return; }/*from w w w . ja v a 2 s . c o m*/ ArrayList<? extends Parcelable> arrayList; if (list instanceof ArrayList) { arrayList = (ArrayList<? extends Parcelable>) list; } else { arrayList = new ArrayList<>(list); } bundle.putParcelableArrayList(key, arrayList); } }