List of usage examples for android.os Parcel readParcelableArray
public final Parcelable[] readParcelableArray(ClassLoader loader)
From source file:Main.java
public static ContentValues[] arrayContentValuesFromByteArray(byte[] byteArray) { Parcel obtain = Parcel.obtain(); obtain.unmarshall(byteArray, 0, byteArray.length); obtain.setDataPosition(0);// w w w .j a v a2 s . c om Parcelable[] contentValues = obtain.readParcelableArray(ContentValues.class.getClassLoader()); ContentValues[] values = new ContentValues[contentValues.length]; for (int i = 0; i < contentValues.length; i++) { values[i] = (ContentValues) contentValues[i]; } obtain.recycle(); return values; }
From source file:com.bmd.android.collection.example.EnhancedArrayMap.java
private EnhancedArrayMap(final Parcel parcel) { final Parcelable[] array = parcel.readParcelableArray(EnhancedArrayMap.class.getClassLoader()); for (final Parcelable parcelable : array) { @SuppressWarnings("unchecked") final ParcelableObjectSparseObjectEntry<K, V> entry = (ParcelableObjectSparseObjectEntry<K, V>) parcelable; put(entry.getKey(), entry.getValue()); }/* w w w . j a v a 2 s .co m*/ mIterable = AndroidCollections.iterate(this); }
From source file:com.bangz.shotrecorder.SplitManager.java
private void readFromParcel(Parcel in) { SplitItem[] ss = (SplitItem[]) in.readParcelableArray(SplitItem.class.getClassLoader()); Splits.addAll(Arrays.asList(ss)); }
From source file:com.grepsound.model.Playlist.java
private Playlist(Parcel in) { info = (HashMap<String, String>) in.readSerializable(); set = new Tracks(); set.addAll(Arrays.asList((Track[]) in.readParcelableArray(Track.class.getClassLoader()))); }
From source file:android.support.design.internal.ParcelableSparseArray.java
public ParcelableSparseArray(Parcel source, ClassLoader loader) { super();/* w w w . j a v a 2s. c o m*/ int size = source.readInt(); int[] keys = new int[size]; source.readIntArray(keys); Parcelable[] values = source.readParcelableArray(loader); for (int i = 0; i < size; ++i) { put(keys[i], values[i]); } }
From source file:com.morphoss.jumble.models.Word.java
private void readFromParcel(Parcel in) { nameKey = in.readString();/* ww w . j a v a 2s .c o m*/ imagePath = in.readString(); Parcelable[] arr = in.readParcelableArray(Localisation.class.getClassLoader()); for (Parcelable p : arr) this.localisations.put(((Localisation) p).getCountryCode(), (Localisation) p); }
From source file:com.codebutler.farebot.transit.orca.OrcaTransitData.java
private OrcaTransitData(Parcel parcel) { mSerialNumber = parcel.readInt();//from ww w. ja v a 2s. c om mBalance = parcel.readDouble(); parcel.readInt(); mTrips = (Trip[]) parcel.readParcelableArray(Trip.class.getClassLoader()); }
From source file:com.github.jobs.bean.AboutMeUser.java
public AboutMeUser(Parcel in) { firstName = (String) in.readValue(null); lastName = (String) in.readValue(null); header = (String) in.readValue(null); profile = (String) in.readValue(null); bio = (String) in.readValue(null); services = (AboutMeService[]) in.readParcelableArray(AboutMeService.class.getClassLoader()); }
From source file:com.codebutler.farebot.transit.OrcaTransitData.java
public OrcaTransitData(Parcel parcel) { mSerialNumber = parcel.readInt(); mBalance = parcel.readDouble(); parcel.readInt(); mTrips = (Trip[]) parcel.readParcelableArray(null); }
From source file:com.facebook.login.LoginClient.java
public LoginClient(Parcel source) { Object[] o = source.readParcelableArray(LoginMethodHandler.class.getClassLoader()); handlersToTry = new LoginMethodHandler[o.length]; for (int i = 0; i < o.length; ++i) { handlersToTry[i] = (LoginMethodHandler) o[i]; handlersToTry[i].setLoginClient(this); }//from w w w . j a v a2 s . c om currentHandler = source.readInt(); pendingRequest = source.readParcelable(Request.class.getClassLoader()); loggingExtras = Utility.readStringMapFromParcel(source); }