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:ch.berta.fabio.popularmovies.presentation.viewmodels.MovieGridViewModelOnlImpl.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);

    dest.writeTypedList(mMovies);/*  w w  w  .  ja  va 2s.co m*/
    dest.writeInt(mMoviePage);
    dest.writeByte(mRefreshing ? (byte) 1 : (byte) 0);
    dest.writeByte(mLoadingMore ? (byte) 1 : (byte) 0);
    dest.writeByte(mLoadingNewSort ? (byte) 1 : (byte) 0);
    dest.writeParcelable(mSortSelected, 0);
    dest.writeInt(mMovieDbIdSelected);
}

From source file:com.richtodd.android.quiltdesign.block.PaperPiecedBlockPiece.java

@Override
public void writeToParcel(Parcel out, int flags) {
    out.writeSerializable(m_id);//from   w w w . j  a v  a 2s .  c om
    out.writeParcelable(m_from, 0);
    out.writeParcelable(m_to, 0);
    out.writeInt(m_color);
}

From source file:com.itude.mobile.mobbl.core.model.MBElement.java

@Override
public void writeToParcel(Parcel out, int flags) {
    Bundle valueBundle = new Bundle();

    for (String key : _values.keySet()) {
        valueBundle.putString(key, _values.get(key));
    }//from www.  jav  a  2 s. c om

    out.writeBundle(valueBundle);
    out.writeParcelable(_definition, flags);
}

From source file:net.soulwolf.structure.core.FragmentParameter.java

@Override
public void writeToParcel(Parcel dest, int flags) {

    dest.writeSerializable(mFragmentClass);

    dest.writeBundle(mParams);/*w  w  w  . jav a2s.co m*/

    dest.writeString(mTag);

    dest.writeInt(mRequestCode);

    dest.writeInt(mResultCode);

    int size = 0;
    if (mAnimationRes != null) {
        size = mAnimationRes.length;
    }
    dest.writeInt(size);

    dest.writeIntArray(mAnimationRes);

    dest.writeParcelable(mResultParams, flags);
}

From source file:id.satusatudua.sigap.data.model.ImportantContact.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(contactId);//w  ww .  j av a 2 s.c om
    dest.writeString(name);
    dest.writeString(phoneNumber);
    dest.writeString(userId);
    dest.writeString(address);
    dest.writeLong(createdAt.getTime());
    dest.writeDouble(avgRate);
    dest.writeDouble(totalRate);
    dest.writeLong(totalUserRate);
    dest.writeInt(myRate);
    dest.writeByte((byte) (bookmarked ? 1 : 0));
    dest.writeParcelable(user, flags);
}

From source file:nuclei.ui.share.PackageTargetManager.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(mFacebookId);/*  w ww . j av  a 2 s . c  o  m*/
    dest.writeString(mText);
    dest.writeString(mUrl);
    dest.writeString(mSms);
    dest.writeString(mEmail);
    dest.writeString(mSubject);
    dest.writeSerializable(mFile);
    dest.writeParcelable(mUri, 0);
}

From source file:saphion.batterycaster.providers.Alarm.java

public void writeToParcel(Parcel p, int flags) {
    p.writeLong(id);/*from   w  w w .ja v  a 2  s.com*/
    p.writeInt(enabled ? 1 : 0);
    p.writeInt(battery);
    p.writeInt(charge);
    p.writeInt(daysOfWeek.getBitSet());
    p.writeInt(vibrate ? 1 : 0);
    p.writeString(label);
    p.writeParcelable(alert, flags);
    p.writeInt(deleteAfterUse ? 1 : 0);
}

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

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this.id);
    dest.writeString(this.title);
    dest.writeInt(this.size);
    dest.writeInt(this.privacy);
    dest.writeString(this.description);
    dest.writeInt(this.owner_id);
    dest.writeByte(can_upload ? (byte) 1 : (byte) 0);
    dest.writeLong(this.updated);
    dest.writeLong(this.created);
    dest.writeInt(this.thumb_id);
    dest.writeString(this.thumb_src);
    dest.writeParcelable(this.photo, flags);
}

From source file:pl.poznan.put.cs.ify.api.params.YParam.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(mType.ordinal());// ww  w .  j  a  va2 s . c  o m
    switch (mType) {
    case Boolean:
        dest.writeByte((byte) ((Boolean) mValue ? 0 : 1));
        break;
    case Integer:
        dest.writeInt((Integer) mValue);
        break;
    case String:
        dest.writeString((String) mValue);
        break;
    case Group:
        dest.writeString((String) mValue);
        break;
    case Position:
        dest.writeParcelable((YPosition) mValue, 0);
    default:
        dest.writeString((String) mValue);
    }
}

From source file:org.teleportr.Ride.java

@Override
public void writeToParcel(Parcel out, int flags) {
    if (details != null) {
        cv.put(DETAILS, details.toString());
    }//from  w w w .  j  a  v  a2  s  .com
    out.writeParcelable(cv, 0);
}