List of usage examples for android.os Parcel readParcelable
@SuppressWarnings("unchecked") public final <T extends Parcelable> T readParcelable(ClassLoader loader)
From source file:com.vk.sdk.api.model.VKApiMessage.java
/** * Creates a Message instance from Parcel. *//* w w w.j a v a 2 s. co m*/ public VKApiMessage(Parcel in) { this.id = in.readInt(); this.user_id = in.readInt(); this.date = in.readLong(); this.read_state = in.readByte() != 0; this.out = in.readByte() != 0; this.title = in.readString(); this.body = in.readString(); this.attachments = in.readParcelable(VKAttachments.class.getClassLoader()); this.fwd_messages = in.readParcelable(VKList.class.getClassLoader()); this.emoji = in.readByte() != 0; this.deleted = in.readByte() != 0; }
From source file:com.vk.sdk.api.model.VKApiPoll.java
/** * Creates a Poll instance from Parcel.//from w w w .j av a 2s. c o m */ public VKApiPoll(Parcel in) { this.id = in.readInt(); this.owner_id = in.readInt(); this.created = in.readLong(); this.question = in.readString(); this.votes = in.readInt(); this.answer_id = in.readInt(); this.answers = in.readParcelable(VKList.class.getClassLoader()); }
From source file:com.baasbox.android.BaasUser.java
private static JsonObject readOptJson(Parcel p) { if (p.readByte() == 1) { return p.readParcelable(JsonArray.class.getClassLoader()); } else {/* w w w .ja v a2s . c om*/ return null; } }
From source file:com.citrus.sdk.CitrusUser.java
private CitrusUser(Parcel in) { this.firstName = in.readString(); this.lastName = in.readString(); this.emailId = in.readString(); this.mobileNo = in.readString(); this.address = in.readParcelable(Address.class.getClassLoader()); }
From source file:com.vk.sdk.api.model.VKAttachments.java
public VKAttachments(Parcel parcel) { int size = parcel.readInt(); for (int i = 0; i < size; i++) { String type = parcel.readString(); if (TYPE_PHOTO.equals(type)) { add((VKApiAttachment) parcel.readParcelable(VKApiPhoto.class.getClassLoader())); } else if (TYPE_VIDEO.equals(type)) { add((VKApiAttachment) parcel.readParcelable(VKApiVideo.class.getClassLoader())); } else if (TYPE_AUDIO.equals(type)) { add((VKApiAttachment) parcel.readParcelable(VKApiAudio.class.getClassLoader())); } else if (TYPE_DOC.equals(type)) { add((VKApiAttachment) parcel.readParcelable(VKApiDocument.class.getClassLoader())); } else if (TYPE_POST.equals(type)) { add((VKApiAttachment) parcel.readParcelable(VKApiPost.class.getClassLoader())); } else if (TYPE_POSTED_PHOTO.equals(type)) { add((VKApiAttachment) parcel.readParcelable(VKApiPostedPhoto.class.getClassLoader())); } else if (TYPE_LINK.equals(type)) { add((VKApiAttachment) parcel.readParcelable(VKApiLink.class.getClassLoader())); } else if (TYPE_NOTE.equals(type)) { add((VKApiAttachment) parcel.readParcelable(VKApiNote.class.getClassLoader())); } else if (TYPE_APP.equals(type)) { add((VKApiAttachment) parcel.readParcelable(VKApiApplicationContent.class.getClassLoader())); } else if (TYPE_POLL.equals(type)) { add((VKApiAttachment) parcel.readParcelable(VKApiPoll.class.getClassLoader())); } else if (TYPE_WIKI_PAGE.equals(type)) { add((VKApiAttachment) parcel.readParcelable(VKApiWikiPage.class.getClassLoader())); } else if (TYPE_ALBUM.equals(type)) { add((VKApiAttachment) parcel.readParcelable(VKApiPhotoAlbum.class.getClassLoader())); }/*from w w w . j a va 2 s .c om*/ } }
From source file:com.jetradar.multibackstack.BackStackEntry.java
private BackStackEntry(Parcel in) { final ClassLoader loader = getClass().getClassLoader(); fname = in.readString();// www . j a v a 2 s .c om args = in.readBundle(loader); switch (in.readInt()) { case NO_STATE: state = null; break; case SAVED_STATE: state = SavedState.CREATOR.createFromParcel(in); break; case PARCELABLE_STATE: state = in.readParcelable(loader); break; default: throw new IllegalStateException(); } }
From source file:com.tigerpenguin.places.model.Place.java
@SuppressWarnings("unchecked") public Place(Parcel in) { placeId = in.readString();//from w ww. ja v a 2 s .co m name = in.readString(); vicinity = in.readString(); formattedAddress = in.readString(); priceLevel = (PriceLevel) in.readSerializable(); rating = in.readDouble(); iconUrl = in.readString(); types = in.readArrayList(PlaceType.class.getClassLoader()); geometry = in.readParcelable(Geometry.class.getClassLoader()); openingHours = in.readParcelable(OpeningHours.class.getClassLoader()); photos = in.readArrayList(Photo.class.getClassLoader()); }
From source file:com.vk.sdk.api.model.VKApiDocument.java
/** * Creates a Doc instance from Parcel.// w ww.j a va2s .c o m */ public VKApiDocument(Parcel in) { this.id = in.readInt(); this.owner_id = in.readInt(); this.title = in.readString(); this.size = in.readLong(); this.ext = in.readString(); this.url = in.readString(); this.photo_100 = in.readString(); this.photo_130 = in.readString(); this.photo = in.readParcelable(VKPhotoSizes.class.getClassLoader()); this.access_key = in.readString(); this.mIsImage = in.readByte() != 0; this.mIsGif = in.readByte() != 0; }
From source file:org.alfresco.mobile.android.api.session.impl.CloudSessionImpl.java
@SuppressWarnings("unchecked") public CloudSessionImpl(Parcel o) { this.baseUrl = o.readString(); this.userIdentifier = o.readString(); this.password = o.readString(); this.currentNetwork = (CloudNetwork) o.readSerializable(); this.rootNode = o.readParcelable(FolderImpl.class.getClassLoader()); this.repositoryInfo = (RepositoryInfo) o.readSerializable(); this.cmisSession = (Session) o.readSerializable(); Bundle b = o.readBundle();// w w w . ja v a 2 s. c o m this.userParameters = (Map<String, Serializable>) b.getSerializable("userParameters"); create(); }
From source file:ch.berta.fabio.popularmovies.presentation.viewmodels.MovieGridViewModelOnlImpl.java
protected MovieGridViewModelOnlImpl(Parcel in) { super(in);/* w w w .j a v a 2 s .co m*/ mMovies = in.createTypedArrayList(Movie.CREATOR); mMoviePage = in.readInt(); mRefreshing = in.readByte() != 0; mLoadingMore = in.readByte() != 0; mLoadingNewSort = in.readByte() != 0; mSortSelected = in.readParcelable(Sort.class.getClassLoader()); mMovieDbIdSelected = in.readInt(); }