Java Code Examples for android.os.Parcel.writeValue()

The following are Jave code examples for showing how to use writeValue() of the android.os.Parcel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: PeSanKita-android   File: MasterSecret.java   Source Code and License Vote up 7 votes
public MasterSecret parcelClone() {
  Parcel thisParcel = Parcel.obtain();
  Parcel thatParcel = Parcel.obtain();
  byte[] bytes      = null;

  thisParcel.writeValue(this);
  bytes = thisParcel.marshall();

  thatParcel.unmarshall(bytes, 0, bytes.length);
  thatParcel.setDataPosition(0);

  MasterSecret that = (MasterSecret)thatParcel.readValue(MasterSecret.class.getClassLoader());

  thisParcel.recycle();
  thatParcel.recycle();

  return that;
}
 
Example 2
Project: AURdroid   File: AurSearchResult.java   Source Code and License Vote up 6 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(this.iD);
    dest.writeString(this.name);
    dest.writeValue(this.packageBaseID);
    dest.writeString(this.packageBase);
    dest.writeString(this.version);
    dest.writeString(this.description);
    dest.writeString(this.uRL);
    dest.writeValue(this.numVotes);
    dest.writeValue(this.popularity);
    dest.writeString(this.outOfDate);
    dest.writeString(this.maintainer);
    dest.writeValue(this.firstSubmitted);
    dest.writeValue(this.lastModified);
    dest.writeString(this.uRLPath);
}
 
Example 3
Project: whatanime-android   File: SearchDetail.java   Source Code and License Vote up 6 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(this.fromTime);
    dest.writeValue(this.toTime);
    dest.writeValue(this.atTime);
    dest.writeString(this.episode);
    dest.writeValue(this.similarity);
    dest.writeValue(this.anilistId);
    dest.writeString(this.japaneseTitle);
    dest.writeString(this.englishTitle);
    dest.writeString(this.romanjiTitle);
    dest.writeStringList(this.synonyms);
    dest.writeString(this.season);
    dest.writeString(this.anime);
    dest.writeString(this.fileName);
    dest.writeString(this.tokenThumb);
}
 
Example 4
Project: Bigbang   File: SimpleDialog.java   Source Code and License Vote up 6 votes
@Override
protected void onWriteToParcel(Parcel dest, int flags) {
    dest.writeInt(mMode);
    switch (mMode){
        case MODE_MESSAGE:
            dest.writeValue(mMessage);
            break;
        case MODE_ITEMS:
            dest.writeArray(mItems);
            dest.writeInt(mSelectedIndexes == null ? 0 : mSelectedIndexes[0]);
            break;
        case MODE_MULTI_ITEMS:
            dest.writeArray(mItems);
            int length = mSelectedIndexes == null ? 0 : mSelectedIndexes.length;
            dest.writeInt(length);
            if(length > 0)
                dest.writeIntArray(mSelectedIndexes);
            break;
        }
    }
 
Example 5
Project: AndroidUnplash   File: Urls.java   Source Code and License Vote up 5 votes
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(raw);
    dest.writeValue(full);
    dest.writeValue(regular);
    dest.writeValue(small);
    dest.writeValue(thumb);
}
 
Example 6
Project: NotifyTools   File: SongCi.java   Source Code and License Vote up 5 votes
@Override public void writeToParcel(Parcel dest, int flags) {
  dest.writeValue(this.id);
  dest.writeString(this.author);
  dest.writeString(this.rhythmic);
  dest.writeString(this.content);
  dest.writeString(this.pyquan);
  dest.writeString(this.pyquany);
  dest.writeString(this.pyjian);
}
 
Example 7
Project: RxRetrofit-Android   File: ApiDetail.java   Source Code and License Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(this.dstOffset);
    dest.writeValue(this.rawOffset);
    dest.writeString(this.status);
    dest.writeString(this.timeZoneId);
    dest.writeString(this.timeZoneName);
}
 
Example 8
Project: GitHub   File: ProvinceBean.java   Source Code and License Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
  dest.writeString(this.id);
  dest.writeString(this.name);
  dest.writeString(this.pinYin);
  dest.writeValue(this.gisGcj02Lat);
  dest.writeValue(this.gisGcj02Lng);
  dest.writeValue(this.gisBd09Lat);
  dest.writeValue(this.gisBd09Lng);
  dest.writeString(this.zipcode);
  dest.writeList(this.cityList);
}
 
Example 9
Project: android-auto-mapper   File: GrandChild.java   Source Code and License Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.name);
    dest.writeString(this.details);
    dest.writeValue(this.length);
    dest.writeInt(this.id);
}
 
Example 10
Project: GitHub   File: ParcelFn.java   Source Code and License Vote up 5 votes
static byte[] marshall(Object o) {
    Parcel parcel = Parcel.obtain();
    parcel.writeValue(o);
    byte[] result = parcel.marshall();
    parcel.recycle();
    return result;
}
 
Example 11
Project: AndroidUnplash   File: Exif.java   Source Code and License Vote up 5 votes
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(make);
    dest.writeValue(model);
    dest.writeValue(exposureTime);
    dest.writeValue(aperture);
    dest.writeValue(focalLength);
    dest.writeValue(iso);
}
 
Example 12
Project: dagger-test-example   File: List.java   Source Code and License Vote up 5 votes
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(dt);
    dest.writeValue(temp);
    dest.writeValue(pressure);
    dest.writeValue(humidity);
    dest.writeList(weather);
    dest.writeValue(speed);
    dest.writeValue(deg);
    dest.writeValue(clouds);
    dest.writeValue(rain);
}
 
Example 13
Project: PatternLockView   File: PatternLockView.java   Source Code and License Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeString(mSerializedPattern);
    dest.writeInt(mDisplayMode);
    dest.writeValue(mInputEnabled);
    dest.writeValue(mInStealthMode);
    dest.writeValue(mTactileFeedbackEnabled);
}
 
Example 14
Project: okuki   File: WrappedPlace.java   Source Code and License Vote up 5 votes
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeSerializable(placeClass);
    parcel.writeSerializable(dataClass);
    if (Void.class.equals(dataClass)) {
        parcel.writeValue(null);
    } else if (Parcelable.class.isAssignableFrom(dataClass)) {
        parcel.writeParcelable((Parcelable) data, 0);
    } else if (Serializable.class.isAssignableFrom(dataClass)) {
        parcel.writeSerializable((Serializable) data);
    } else {
        throw new RuntimeException(String.format("Error restoring place %s", placeClass));
    }
}
 
Example 15
Project: Farmacias   File: FarmaciasCsvBean.java   Source Code and License Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this._id);
    dest.writeString(this.address);
    dest.writeString(this.horario);
    dest.writeValue(this.lat);
    dest.writeValue(this.lon);
    dest.writeString(this.name);
    dest.writeString(this.phone);
    dest.writeString(this.locality);
    dest.writeString(this.province);
    dest.writeString(this.postal_code);
}
 
Example 16
Project: dagger-test-example   File: Wind.java   Source Code and License Vote up 4 votes
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(speed);
    dest.writeValue(deg);
}
 
Example 17
Project: MovieApp   File: Ids.java   Source Code and License Vote up 4 votes
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(trakt);
    dest.writeValue(slug);
    dest.writeValue(imdb);
    dest.writeValue(tmdb);
}
 
Example 18
Project: mvvm-template   File: Repo.java   Source Code and License Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(this.id);
    dest.writeString(this.name);
    dest.writeString(this.fullName);
    dest.writeParcelable(this.owner, flags);
    dest.writeString(this.memberLoginName);
    dest.writeByte(this._private ? (byte) 1 : (byte) 0);
    dest.writeString(this.htmlUrl);
    dest.writeString(this.description);
    dest.writeByte(this.fork ? (byte) 1 : (byte) 0);
    dest.writeString(this.url);
    dest.writeString(this.forksUrl);
    dest.writeString(this.keysUrl);
    dest.writeString(this.collaboratorsUrl);
    dest.writeString(this.teamsUrl);
    dest.writeString(this.hooksUrl);
    dest.writeString(this.issueEventsUrl);
    dest.writeString(this.eventsUrl);
    dest.writeString(this.assigneesUrl);
    dest.writeString(this.branchesUrl);
    dest.writeString(this.tagsUrl);
    dest.writeString(this.blobsUrl);
    dest.writeString(this.gitTagsUrl);
    dest.writeString(this.gitRefsUrl);
    dest.writeString(this.treesUrl);
    dest.writeString(this.statusesUrl);
    dest.writeString(this.languagesUrl);
    dest.writeString(this.stargazersUrl);
    dest.writeString(this.contributorsUrl);
    dest.writeString(this.subscribersUrl);
    dest.writeString(this.subscriptionUrl);
    dest.writeString(this.commitsUrl);
    dest.writeString(this.gitCommitsUrl);
    dest.writeString(this.commentsUrl);
    dest.writeString(this.issueCommentUrl);
    dest.writeString(this.contentsUrl);
    dest.writeString(this.compareUrl);
    dest.writeString(this.mergesUrl);
    dest.writeString(this.archiveUrl);
    dest.writeString(this.downloadsUrl);
    dest.writeString(this.issuesUrl);
    dest.writeString(this.pullsUrl);
    dest.writeString(this.milestonesUrl);
    dest.writeString(this.notificationsUrl);
    dest.writeString(this.labelsUrl);
    dest.writeString(this.releasesUrl);
    dest.writeString(this.deploymentsUrl);
    dest.writeString(this.createdAt);
    dest.writeString(this.updatedAt);
    dest.writeString(this.pushedAt);
    dest.writeString(this.gitUrl);
    dest.writeString(this.sshUrl);
    dest.writeString(this.cloneUrl);
    dest.writeString(this.svnUrl);
    dest.writeString(this.homepage);
    dest.writeLong(this.size);
    dest.writeLong(this.stargazersCount);
    dest.writeLong(this.watchersCount);
    dest.writeString(this.language);
    dest.writeByte(this.hasIssues ? (byte) 1 : (byte) 0);
    dest.writeByte(this.hasProjects ? (byte) 1 : (byte) 0);
    dest.writeByte(this.hasDownloads ? (byte) 1 : (byte) 0);
    dest.writeByte(this.hasWiki ? (byte) 1 : (byte) 0);
    dest.writeByte(this.hasPages ? (byte) 1 : (byte) 0);
    dest.writeLong(this.forksCount);
    dest.writeString(this.mirrorUrl);
    dest.writeLong(this.openIssuesCount);
    dest.writeLong(this.forks);
    dest.writeLong(this.openIssues);
    dest.writeLong(this.watchers);
    dest.writeString(this.defaultBranch);
}
 
Example 19
Project: MovieApp   File: Similar.java   Source Code and License Vote up 4 votes
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(page);
    dest.writeList(movies);
    dest.writeValue(totalPages);
    dest.writeValue(totalResults);
}
 
Example 20
Project: dagger-test-example   File: Rain.java   Source Code and License Vote up 4 votes
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(_3h);
}