Code example for Parcel

Methods: readArrayList, readInt, readLong, readString

0
			writeBool(out, gps);
		} 
		 
		@SuppressWarnings("unchecked") 
		public void readFromParcel(Parcel in) {
			route_id = in.readString();
			id = in.readString();
			title = in.readString();
			lat = in.readString();
			lon = in.readString();
			next = in.readLong();
			 
			predictions = (ArrayList<Integer>) in.readArrayList(Integer.class.getClassLoader());
			 
			direction = in.readString();
						 
			path = in.readArrayList(Loc.class.getClassLoader());
			 
			upcoming = readBool(in);
			gps = readBool(in);
		} 
 
		@Override 
		public int describeContents() { 
			return 0; 
		} 
	} 
	 
	/**************************/ 
	void parseListView() { 
		 
	} 
	void parseDetails() { 
		 
	} 
	 
	private static void writeBool(Parcel dest, boolean bool) {
		dest.writeInt(bool ? 1 : 0);
	} 
	 
	private static boolean readBool(Parcel in) {
		return (in.readInt() == 1);
	} 
} 
 
/* 
[