Android examples for android.os:Parcel
read Type ArrayList from Parcel
//package com.java2s; import android.os.Parcel; import android.os.Parcelable; import java.util.ArrayList; public class Main { public static <T extends Parcelable> ArrayList<T> readTypeArrayList( Parcel source, Parcelable.Creator<T> creator) { boolean isNull = readBoolean(source); if (isNull) { return null; } else {/*from w w w .j av a 2s .c o m*/ return source.createTypedArrayList(creator); } } public static boolean readBoolean(Parcel source) { return source.readInt() == 1; } }