Example usage for android.os Parcel writeParcelable

List of usage examples for android.os Parcel writeParcelable

Introduction

In this page you can find the example usage for android.os Parcel writeParcelable.

Prototype

public final void writeParcelable(Parcelable p, int parcelableFlags) 

Source Link

Document

Flatten the name of the class of the Parcelable and its contents into the parcel.

Usage

From source file:com.eTilbudsavis.etasdk.model.Session.java

public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.mToken);
    dest.writeLong(mExpires != null ? mExpires.getTime() : -1);
    dest.writeParcelable(this.mUser, flags);
    dest.writeParcelable(this.mPermission, flags);
    dest.writeString(this.mProvider);
    dest.writeString(this.mClientId);
    dest.writeString(this.mReference);
}

From source file:com.codebutler.farebot.card.felica.FelicaCard.java

@Override
public void writeToParcel(Parcel parcel, int flags) {
    super.writeToParcel(parcel, flags);
    parcel.writeParcelable(mIDm, flags);
    parcel.writeParcelable(mPMm, flags);
    parcel.writeInt(mSystems.length);//from  ww w . j  a va 2s .  co  m
    parcel.writeTypedArray(mSystems, flags);
}

From source file:com.facebook.notifications.internal.asset.ParcelableAssetHandler.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    if (handler == null) {
        throw new IllegalStateException("AssetHandler should not be null, did you forget to call validate()?");
    }//from w w  w  . ja v  a2s.c  o m

    if (handler instanceof Parcelable) {
        dest.writeInt(1);
        dest.writeParcelable((Parcelable) handler, flags);
    } else {
        dest.writeInt(0);
        dest.writeString(handler.getClass().getName());
    }
}

From source file:com.codebutler.farebot.card.desfire.DesfireFile.java

public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeInt(mId);/*from w w  w.  j  a  v  a2  s  .  co  m*/
    if (this instanceof InvalidDesfireFile) {
        parcel.writeInt(1);
        parcel.writeString(((InvalidDesfireFile) this).getErrorMessage());
    } else {
        parcel.writeInt(0);
        parcel.writeParcelable(mSettings, 0);
        parcel.writeInt(mData.length);
        parcel.writeByteArray(mData);
    }
}

From source file:com.vk.sdk.api.model.VKAttachments.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(size());/*  www.  ja v  a  2  s.c om*/
    for (VKApiAttachment attachment : this) {
        dest.writeString(attachment.getType());
        dest.writeParcelable(attachment, 0);
    }
}

From source file:com.getchute.android.photopickerplus.models.MediaResponseModel.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeTypedList(assetList);//from  w w w  .  ja v  a 2 s .c o m
    dest.writeString(clientId);
    dest.writeString(createdAt);
    dest.writeString(storeId);
    dest.writeString(updatedAt);
    dest.writeParcelable(parcel, flags);
    dest.writeParcelable(profile, flags);

}

From source file:com.scvngr.levelup.core.net.LevelUpRequest.java

@Override
public void writeToParcel(final Parcel dest, final int flags) {
    super.writeToParcel(dest, flags);
    dest.writeParcelable(mAccessTokenRetriever, flags);
    dest.writeParcelable(mBody, flags);//from  ww  w  .java2s  . com
}

From source file:com.nextgis.maplib.datasource.ngw.ResourceGroup.java

@Override
public void writeToParcel(Parcel parcel, int i) {
    super.writeToParcel(parcel, i);
    parcel.writeByte(mChildrenLoaded ? (byte) 1 : (byte) 0);
    parcel.writeInt(mChildren.size());/*  w  ww .ja  v  a  2s. c om*/
    for (Resource resource : mChildren) {
        parcel.writeInt(resource.getType());
        parcel.writeParcelable(resource, i);
    }
}

From source file:com.vk.sdk.api.model.VKApiPoll.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this.id);
    dest.writeInt(this.owner_id);
    dest.writeLong(this.created);
    dest.writeString(this.question);
    dest.writeInt(this.votes);
    dest.writeInt(this.answer_id);
    dest.writeParcelable(this.answers, flags);
}

From source file:com.jetradar.multibackstack.BackStackEntry.java

@Override
public void writeToParcel(Parcel out, int flags) {
    out.writeString(fname);/*from   w  w  w  .j a  v a 2s  .c o m*/
    out.writeBundle(args);

    if (state == null) {
        out.writeInt(NO_STATE);
    } else if (state.getClass() == SavedState.class) {
        out.writeInt(SAVED_STATE);
        state.writeToParcel(out, flags);
    } else {
        out.writeInt(PARCELABLE_STATE);
        out.writeParcelable(state, flags);
    }
}