List of usage examples for android.os Parcel writeInt
public final void writeInt(int val)
From source file:com.jecelyin.editor.v2.core.text.TextUtils.java
private static void writeWhere(Parcel p, Spanned sp, Object o) { p.writeInt(sp.getSpanStart(o)); p.writeInt(sp.getSpanEnd(o));// w w w. j a v a2 s. c o m p.writeInt(sp.getSpanFlags(o)); }
From source file:com.tigerpenguin.places.model.PlaceDetail.java
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeList(addressComponents);/*w ww.java2 s. c o m*/ dest.writeString(formattedAddress); dest.writeString(localPhone); dest.writeParcelable(geometry, flags); dest.writeString(iconUrl); dest.writeString(placeId); dest.writeString(internationalPhone); dest.writeString(name); dest.writeParcelable(openingHours, flags); dest.writeList(photos); dest.writeSerializable(priceLevel); dest.writeDouble(rating); dest.writeList(reviews); dest.writeList(types); dest.writeString(googlePlacePageUrl); dest.writeInt(utcOffset); dest.writeString(vicinity); dest.writeString(businessWebsite); }
From source file:io.github.hidroh.materialistic.data.HackerNewsItem.java
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeLong(id);/*ww w .j a va 2 s . c om*/ dest.writeString(title); dest.writeLong(time); dest.writeString(by); dest.writeLongArray(kids); dest.writeString(url); dest.writeString(text); dest.writeString(type); dest.writeInt(favorite ? 1 : 0); dest.writeInt(descendants); dest.writeInt(score); dest.writeInt(favorite ? 1 : 0); dest.writeInt(viewed ? 1 : 0); dest.writeInt(localRevision); dest.writeInt(level); dest.writeInt(dead ? 1 : 0); dest.writeInt(deleted ? 1 : 0); dest.writeInt(collapsed ? 1 : 0); dest.writeInt(contentExpanded ? 1 : 0); dest.writeInt(rank); dest.writeInt(lastKidCount); dest.writeInt(hasNewDescendants ? 1 : 0); dest.writeLong(parent); dest.writeInt(voted ? 1 : 0); dest.writeInt(pendingVoted ? 1 : 0); dest.writeLong(next); dest.writeLong(previous); }
From source file:com.vk.sdk.api.model.VKApiCommunityFull.java
@Override public void writeToParcel(Parcel dest, int flags) { super.writeToParcel(dest, flags); dest.writeParcelable(this.city, flags); dest.writeParcelable(this.country, flags); dest.writeParcelable(this.status_audio, flags); dest.writeParcelable(this.place, flags); dest.writeString(this.description); dest.writeString(this.wiki_page); dest.writeInt(this.members_count); dest.writeParcelable(this.counters, flags); dest.writeLong(this.start_date); dest.writeLong(this.end_date); dest.writeByte(can_post ? (byte) 1 : (byte) 0); dest.writeByte(can_see_all_posts ? (byte) 1 : (byte) 0); dest.writeString(this.status); dest.writeParcelable(this.contacts, flags); dest.writeParcelable(this.links, flags); dest.writeInt(this.fixed_post); dest.writeByte(verified ? (byte) 1 : (byte) 0); dest.writeString(this.site); dest.writeByte(blacklisted ? (byte) 1 : (byte) 0); }
From source file:com.chuhan.privatecalc.fragment.os.BackStackState.java
public void writeToParcel(Parcel dest, int flags) { dest.writeIntArray(mOps);//from w w w. j a va 2 s . co m dest.writeInt(mTransition); dest.writeInt(mTransitionStyle); dest.writeString(mName); dest.writeInt(mIndex); dest.writeInt(mBreadCrumbTitleRes); TextUtils.writeToParcel(mBreadCrumbTitleText, dest, 0); dest.writeInt(mBreadCrumbShortTitleRes); TextUtils.writeToParcel(mBreadCrumbShortTitleText, dest, 0); }
From source file:com.jecelyin.editor.v2.core.text.TextUtils.java
/** * Flatten a CharSequence and whatever styles can be copied across processes * into the parcel./*from w ww .j av a 2s . co m*/ */ public static void writeToParcel(CharSequence cs, Parcel p, int parcelableFlags) { if (cs instanceof Spanned) { p.writeInt(0); p.writeString(cs.toString()); Spanned sp = (Spanned) cs; Object[] os = sp.getSpans(0, cs.length(), Object.class); // note to people adding to this: check more specific types // before more generic types. also notice that it uses // "if" instead of "else if" where there are interfaces // so one object can be several. for (int i = 0; i < os.length; i++) { Object o = os[i]; Object prop = os[i]; if (prop instanceof CharacterStyle) { prop = ((CharacterStyle) prop).getUnderlying(); } if (prop instanceof ParcelableSpan) { ParcelableSpan ps = (ParcelableSpan) prop; int spanTypeId = ps.getSpanTypeId(); if (spanTypeId < FIRST_SPAN || spanTypeId > LAST_SPAN) { Log.e(TAG, "external class \"" + ps.getClass().getSimpleName() + "\" is attempting to use the frameworks-only ParcelableSpan" + " interface"); } else { p.writeInt(spanTypeId); ps.writeToParcel(p, parcelableFlags); writeWhere(p, sp, o); } } } p.writeInt(0); } else { p.writeInt(1); if (cs != null) { p.writeString(cs.toString()); } else { p.writeString(null); } } }
From source file:com.eTilbudsavis.etasdk.model.ShoppinglistItem.java
public void writeToParcel(Parcel dest, int flags) { dest.writeString(this.mId); dest.writeString(this.mErn); dest.writeByte(mTick ? (byte) 1 : (byte) 0); dest.writeString(this.mOfferId); dest.writeInt(this.mCount); dest.writeString(this.mDescription); dest.writeString(this.mCreator); dest.writeLong(mModified != null ? mModified.getTime() : -1); dest.writeParcelable(this.mOffer, flags); dest.writeString(this.mShoppinglistId); dest.writeString(this.mPrevId); dest.writeString(this.mMeta); dest.writeInt(this.mUserId); dest.writeInt(this.mSyncState); }
From source file:com.ibm.mobilefirstplatform.clientsdk.android.push.internal.MFPInternalPushMessage.java
@Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(id);/*from w w w . ja va2 s. c o m*/ dest.writeString(alert); dest.writeString(url); dest.writeString(payload); dest.writeString(mid); dest.writeString(sound); dest.writeString(String.valueOf(bridge)); dest.writeString(priority); dest.writeString(visibility); dest.writeString(redact); dest.writeString(category); dest.writeString(key); dest.writeString(gcmStyle); dest.writeString(iconName); dest.writeInt(notificationId); }
From source file:com.eTilbudsavis.etasdk.model.Offer.java
public void writeToParcel(Parcel dest, int flags) { dest.writeString(this.mErn); dest.writeString(this.mHeading); dest.writeString(this.mDescription); dest.writeInt(this.mCatalogPage); dest.writeParcelable(this.mPricing, flags); dest.writeParcelable(this.mQuantity, flags); dest.writeParcelable(this.mImages, flags); dest.writeParcelable(this.mLinks, flags); dest.writeLong(mRunFrom != null ? mRunFrom.getTime() : -1); dest.writeLong(mRunTill != null ? mRunTill.getTime() : -1); dest.writeString(this.mDealerUrl); dest.writeString(this.mDealerId); dest.writeString(this.mStoreUrl); dest.writeString(this.mStoreId); dest.writeString(this.mCatalogUrl); dest.writeString(this.mCatalogId); dest.writeParcelable(this.mCatalog, flags); dest.writeParcelable(this.mDealer, flags); dest.writeParcelable(this.mStore, flags); }
From source file:com.paranoid.gerrit.objects.JSONCommit.java
@Override public void writeToParcel(Parcel parcel, int i) { parcel.writeString(mKind);/*from ww w. j av a 2 s . c o m*/ parcel.writeString(mId); parcel.writeString(mProject); parcel.writeString(mBranch); parcel.writeString(mChangeId); parcel.writeString(mSubject); parcel.writeString(mStatus.name()); parcel.writeString(mCreatedDate); parcel.writeString(mLastUpdatedDate); parcel.writeByte((byte) (mIsMergeable ? 1 : 0)); parcel.writeString(mSortKey); parcel.writeInt(mCommitNumber); parcel.writeString(mCurrentRevision); parcel.writeParcelable(mOwnerObject, 0); parcel.writeParcelable(mPatchSet, 0); parcel.writeParcelable(mFileInfos, 0); parcel.writeString(mWebAddress); parcel.writeParcelable(mReviewers, 0); parcel.writeInt(mPatchSetNumber); parcel.writeTypedList(mMessagesList); }