Code example for Parcel

Methods: createIntArrayreadIntreadMap

0
	/** 
	 * @param in The Parcelable object to read from 
	 */ 
	public void readFromParcel(Parcel in) {
		ArrayList<HashMap<String, Object>> data = new ArrayList<HashMap<String,Object>>();
		int num = in.readInt();
		for(int i=0;i<num;i++)
		{ 
			HashMap<String, Object> map = new HashMap<String, Object>();
			in.readMap(map, MTKAdapter.class.getClassLoader());
			data.add(map);
		} 
		mData = data;
		mResource = mDropDownResource = in.createIntArray();
		mFrom = in.createStringArray();
		mTo = in.createIntArray();
	} 
 
 
	public static final Parcelable.Creator<MTKAdapter> CREATOR             
	= new Parcelable.Creator<MTKAdapter>()  
Experience pair programming with AI  Get Codota for Java