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

The following examples show how to use android.os.Parcel#writeValue() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SimpleDialog.java    From material with Apache License 2.0 6 votes vote down vote up
@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 2
Source File: CourseDetail.java    From edx-app-android with Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(course_id);
    dest.writeString(name);
    dest.writeString(number);
    dest.writeString(org);
    dest.writeString(short_description);
    dest.writeString(start);
    dest.writeValue(start_type);
    dest.writeString(start_display);
    dest.writeString(end);
    dest.writeString(enrollment_start);
    dest.writeString(enrollment_end);
    dest.writeString(blocks_url);
    dest.writeValue(media);
    dest.writeString(effort);
    dest.writeString(overview);
    dest.writeValue(invitation_only);
}
 
Example 3
Source File: User.java    From droidddle with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(this.id);
    dest.writeString(this.name);
    dest.writeString(this.username);
    dest.writeString(this.htmlUrl);
    dest.writeString(this.avatarUrl);
    dest.writeString(this.bio);
    dest.writeString(this.location);
    dest.writeParcelable(this.links, flags);
    dest.writeValue(this.bucketsCount);
    dest.writeValue(this.followersCount);
    dest.writeValue(this.followingsCount);
    dest.writeValue(this.likesCount);
    dest.writeValue(this.projectsCount);
    dest.writeValue(this.shotsCount);
    dest.writeValue(this.teamsCount);
    dest.writeString(this.type);
    dest.writeValue(this.pro);
    dest.writeString(this.bucketsUrl);
    dest.writeString(this.followersUrl);
    dest.writeString(this.followingUrl);
    dest.writeString(this.likesUrl);
    dest.writeString(this.shotsUrl);
    dest.writeString(this.teamsUrl);
    dest.writeLong(createdAt != null ? createdAt.getTime() : -1);
    dest.writeLong(updatedAt != null ? updatedAt.getTime() : -1);
}
 
Example 4
Source File: Order.java    From openapi-generator with Apache License 2.0 5 votes vote down vote up
public void writeToParcel(Parcel out, int flags) {
  out.writeValue(id);
  out.writeValue(petId);
  out.writeValue(quantity);
  out.writeValue(shipDate);
  out.writeValue(status);
  out.writeValue(complete);
}
 
Example 5
Source File: PlaylistBase.java    From spotify-web-api-android with MIT License 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(this.collaborative);
    dest.writeMap(this.external_urls);
    dest.writeValue(this.href);
    dest.writeValue(this.id);
    dest.writeTypedList(this.images);
    dest.writeValue(this.name);
    dest.writeParcelable(owner, flags);
    dest.writeValue(is_public);
    dest.writeValue(snapshot_id);
    dest.writeValue(type);
    dest.writeValue(uri);
}
 
Example 6
Source File: DeviceSearchSuggestion.java    From ESeal with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.id);
    dest.writeString(this.name);
    dest.writeValue(this.type);
    dest.writeValue(this.isHistory);
}
 
Example 7
Source File: LockPatternView.java    From quickmark with MIT License 5 votes vote down vote up
@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 8
Source File: Result.java    From ESeal with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(this.RESULT);
    dest.writeValue(this.EFFECTIVETOKEN);
    dest.writeString(this.ERRORINFO);
    dest.writeValue(this.ICOUNT);
}
 
Example 9
Source File: Location.java    From fingen with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeString(this.mName);
    dest.writeString(this.mAddress);
    dest.writeValue(this.mLon);
    dest.writeValue(this.mLat);
    dest.writeLong(this.mParentID);
    dest.writeInt(this.mOrderNum);
    dest.writeByte(this.mExpanded ? (byte) 1 : (byte) 0);
}
 
Example 10
Source File: Profile.java    From HeaderView with MIT License 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(id);
    dest.writeValue(avatarUri);
    dest.writeValue(avatarRes);
    dest.writeValue(backgroundUri);
    dest.writeValue(backgroundRes);
    dest.writeValue(username);
    dest.writeValue(email);
}
 
Example 11
Source File: ParcelFn.java    From FlowGeek with GNU General Public License v2.0 5 votes vote down vote up
static byte[] marshall(Object o) {
    Parcel parcel = Parcel.obtain();
    parcel.writeValue(o);
    byte[] result = parcel.marshall();
    parcel.recycle();
    return result;
}
 
Example 12
Source File: TypeHolderDefault.java    From openapi-generator with Apache License 2.0 5 votes vote down vote up
public void writeToParcel(Parcel out, int flags) {
  out.writeValue(stringItem);
  out.writeValue(numberItem);
  out.writeValue(integerItem);
  out.writeValue(boolItem);
  out.writeValue(arrayItem);
}
 
Example 13
Source File: DataMediatorDelegateImpl.java    From data-mediator with Apache License 2.0 5 votes vote down vote up
static void writeSparseArray0(Parcel in, SparseArray val) {
    if (val == null) {
        in.writeInt(-1);
        return;
    }
    int N = val.size();
    in.writeInt(N);
    int i=0;
    while (i < N) {
        in.writeInt(val.keyAt(i));
        in.writeValue(val.valueAt(i));
        i++;
    }
}
 
Example 14
Source File: Query.java    From Stock-Hawk with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(this.mCount);
    dest.writeString(this.mCreated);
    dest.writeString(this.mLang);
    dest.writeParcelable(this.mResult, flags);
}
 
Example 15
Source File: DownloadRecord.java    From AnimeTaste with MIT License 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(this.AnimationId);
    dest.writeString(this.Name);
    dest.writeString(this.OriginVideoUrl);
    dest.writeString(this.HDVideoUrl);
    dest.writeString(this.CommonVideoUrl);
    dest.writeString(this.Author);
    dest.writeString(this.Year);
    dest.writeString(this.Brief);
    dest.writeString(this.HomePic);
    dest.writeString(this.DetailPic);
    dest.writeString(this.Youku);
    dest.writeString(this.UHD);
    dest.writeString(this.HD);
    dest.writeString(this.SD);
    dest.writeByte(IsFav ? (byte) 1 : (byte) 0);
    dest.writeByte(IsWatched ? (byte) 1 : (byte) 0);
    dest.writeLong(AddedTime != null ? AddedTime.getTime() : -1);
    dest.writeLong(this.Size);
    dest.writeLong(this.DownloadedSize);
    dest.writeInt(this.Duration);
    dest.writeInt(this.DownloadedDuration);
    dest.writeInt(this.Segments);
    dest.writeInt(this.DownloadedSegments);
    dest.writeInt(this.DownloadedPercentage);
    dest.writeInt(this.RangeStart);
    dest.writeInt(this.Status);
    dest.writeString(this.Extra);
    dest.writeString(this.SaveDir);
    dest.writeString(this.SaveFileName);
    dest.writeString(this.UsingDownloadUrl);
}
 
Example 16
Source File: Story.java    From hacker-news-android with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(this.mStoryId);
    dest.writeString(this.mTitle);
    dest.writeString(this.mUrl);
    dest.writeString(this.mDomain);
    dest.writeInt(this.mPoints);
    dest.writeString(this.mSubmitter);
    dest.writeString(this.mPublishedTime);
    dest.writeInt(this.mNumComments);
    dest.writeString(this.mType);
    dest.writeByte(isSaved ? (byte) 1 : (byte) 0);
    dest.writeByte(mIsRead ? (byte) 1 : (byte) 0);
}
 
Example 17
Source File: Tag.java    From InstaTag with Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.unique_tag_id);
    dest.writeValue(this.x_co_ord);
    dest.writeValue(this.y_co_ord);
}
 
Example 18
Source File: CoolDetailsResponse.java    From android-wallet-app with GNU General Public License v3.0 4 votes vote down vote up
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(hash);
    dest.writeValue(addr);
    dest.writeValue(bund);
}
 
Example 19
Source File: AdditionalPropertiesBoolean.java    From openapi-generator with Apache License 2.0 4 votes vote down vote up
public void writeToParcel(Parcel out, int flags) {
  super.writeToParcel(out, flags);
  out.writeValue(name);
}
 
Example 20
Source File: Download.java    From AndroidUnplash with MIT License 4 votes vote down vote up
public void writeToParcel(Parcel dest, int flags) {
    dest.writeValue(url);
}