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.baasbox.android.BaasFile.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    Util.writeOptString(dest, name);
    Util.writeOptString(dest, id);
    Util.writeOptString(dest, creationDate);
    Util.writeOptString(dest, author);
    Util.writeOptString(dest, mimeType);
    dest.writeParcelable(attachedData, flags);
    dest.writeParcelable(metaData, flags);
    dest.writeLong(contentLength);/*  ww  w  . java2s .  c om*/
    dest.writeLong(version);
    Util.writeBoolean(dest, isBound.get());
    Util.writeOptBytes(dest, data.get());
}

From source file:com.dwg.weibo.entity.Status.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.created_at);
    dest.writeString(this.id);
    dest.writeString(this.mid);
    dest.writeString(this.idstr);
    dest.writeInt(this.textLength);
    dest.writeString(this.text);
    dest.writeByte(this.isLongText ? (byte) 1 : (byte) 0);
    dest.writeInt(this.source_type);
    dest.writeString(this.source);
    dest.writeByte(this.favorited ? (byte) 1 : (byte) 0);
    dest.writeByte(this.truncated ? (byte) 1 : (byte) 0);
    dest.writeString(this.in_reply_to_status_id);
    dest.writeString(this.in_reply_to_user_id);
    dest.writeString(this.in_reply_to_screen_name);
    dest.writeString(this.thumbnail_pic);
    dest.writeString(this.bmiddle_pic);
    dest.writeString(this.original_pic);
    dest.writeParcelable(this.geo, flags);
    dest.writeParcelable(this.user, flags);
    dest.writeParcelable(this.retweeted_status, flags);
    dest.writeInt(this.reposts_count);
    dest.writeInt(this.comments_count);
    dest.writeInt(this.attitudes_count);
    dest.writeInt(this.mlevel);
    dest.writeParcelable(this.visible, flags);
    dest.writeInt(this.source_allowclick);
    dest.writeList(this.pic_urls);
    dest.writeStringList(this.thumbnail_pic_urls);
    dest.writeStringList(this.bmiddle_pic_urls);
    dest.writeStringList(this.origin_pic_urls);
    dest.writeString(this.singleImgSizeType);
}

From source file:com.google.android.apps.common.testing.accessibility.framework.uielement.ViewHierarchyElement.java

void writeToParcel(Parcel out) {
    ParcelUtils.writeNullableString(out, packageName == null ? null : packageName.toString());
    ParcelUtils.writeNullableString(out, className == null ? null : className.toString());
    ParcelUtils.writeNullableString(out, resourceName);
    if (contentDescription != null) {
        out.writeInt(1);//from  w  ww . jav a  2  s .c  o m
        out.writeParcelable(contentDescription, 0);
    } else {
        out.writeInt(0);
    }
    if (text != null) {
        out.writeInt(1);
        out.writeParcelable(text, 0);
    } else {
        out.writeInt(0);
    }
    out.writeInt(importantForAccessibility ? 1 : 0);
    ParcelUtils.writeNullableBoolean(out, visibleToUser);
    out.writeInt(clickable ? 1 : 0);
    out.writeInt(longClickable ? 1 : 0);
    out.writeInt(focusable ? 1 : 0);
    ParcelUtils.writeNullableBoolean(out, editable);
    ParcelUtils.writeNullableBoolean(out, scrollable);
    ParcelUtils.writeNullableBoolean(out, checkable);
    ParcelUtils.writeNullableBoolean(out, checked);
    ParcelUtils.writeNullableBoolean(out, canScrollForward);
    ParcelUtils.writeNullableBoolean(out, canScrollBackward);
    ParcelUtils.writeNullableBoolean(out, hasTouchDelegate);
    out.writeInt(enabled ? 1 : 0);
    if (boundsInScreen != null) {
        out.writeInt(1);
        boundsInScreen.writeToParcel(out, 0);
    } else {
        out.writeInt(0);
    }
    ParcelUtils.writeNullableInteger(out, nonclippedHeight);
    ParcelUtils.writeNullableInteger(out, nonclippedWidth);
    ParcelUtils.writeNullableFloat(out, textSize);
    ParcelUtils.writeNullableInteger(out, textColor);
    ParcelUtils.writeNullableInteger(out, backgroundDrawableColor);
    ParcelUtils.writeNullableInteger(out, typefaceStyle);
    ParcelUtils.writeNullableLong(out, labeledById);
    ParcelUtils.writeNullableString(out,
            accessibilityClassName == null ? null : accessibilityClassName.toString());
    ParcelUtils.writeNullableLong(out, accessibilityTraversalBeforeId);
    ParcelUtils.writeNullableLong(out, accessibilityTraversalAfterId);
}

From source file:com.baasbox.android.BaasDocument.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(collection);//w  w w .  j  a  v a2 s .com
    Util.writeOptString(dest, id);
    dest.writeLong(version);
    Util.writeOptString(dest, author);
    Util.writeOptString(dest, creation_date);
    Util.writeOptString(dest, rid);
    dest.writeParcelable(data, 0);

}

From source file:com.danlvse.weebo.model.User.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.id);
    dest.writeString(this.idstr);
    dest.writeString(this.screen_name);
    dest.writeString(this.name);
    dest.writeInt(this.province);
    dest.writeInt(this.city);
    dest.writeString(this.location);
    dest.writeString(this.description);
    dest.writeString(this.url);
    dest.writeString(this.profile_image_url);
    dest.writeString(this.profile_url);
    dest.writeString(this.cover_image_phone);
    dest.writeString(this.cover_image);
    dest.writeString(this.domain);
    dest.writeString(this.weihao);
    dest.writeString(this.gender);
    dest.writeInt(this.followers_count);
    dest.writeInt(this.friends_count);
    dest.writeInt(this.statuses_count);
    dest.writeInt(this.favourites_count);
    dest.writeString(this.created_at);
    dest.writeByte(following ? (byte) 1 : (byte) 0);
    dest.writeByte(allow_all_act_msg ? (byte) 1 : (byte) 0);
    dest.writeByte(geo_enabled ? (byte) 1 : (byte) 0);
    dest.writeByte(verified ? (byte) 1 : (byte) 0);
    dest.writeInt(this.verified_type);
    dest.writeString(this.remark);
    dest.writeParcelable(this.status, flags);
    dest.writeByte(allow_all_comment ? (byte) 1 : (byte) 0);
    dest.writeString(this.avatar_large);
    dest.writeString(this.avatar_hd);
    dest.writeString(this.verified_reason);
    dest.writeByte(follow_me ? (byte) 1 : (byte) 0);
    dest.writeInt(this.online_status);
    dest.writeInt(this.bi_followers_count);
    dest.writeString(this.lang);
    dest.writeString(this.star);
    dest.writeString(this.mbtype);
    dest.writeString(this.mbrank);
    dest.writeString(this.block_word);
}

From source file:com.orbar.pxdemo.Model.FiveZeroZeroImageBean.java

@Override
public void writeToParcel(Parcel dest, int flags) {
    Log.v(TAG, "writeToParcel..." + flags);

    dest.writeInt(id);//from ww  w .  j  a  va  2  s  . co m
    dest.writeInt(userId);
    dest.writeString(name);
    dest.writeString(description);
    dest.writeString(camera);
    dest.writeString(lens);
    dest.writeString(focalLength);
    dest.writeString(iso);
    dest.writeString(shutterSpeed);
    dest.writeString(aperture);
    dest.writeInt(timesViewed);
    dest.writeFloat(rating);
    dest.writeString(createdAt);
    dest.writeInt(status);
    dest.writeString(createdAt);
    dest.writeInt(category);
    dest.writeString(location);
    dest.writeByte((byte) (privacy ? 1 : 0)); // Boolean
    dest.writeString(latitude);
    dest.writeString(longitude);
    dest.writeString(takenAt);
    dest.writeInt(hiResUploaded);
    dest.writeByte((byte) (forSale ? 1 : 0)); // Boolean
    dest.writeInt(width);
    dest.writeInt(height);
    dest.writeInt(votesCount);
    dest.writeInt(favoritesCount);
    dest.writeInt(commentsCount);
    dest.writeByte((byte) (nsfw ? 1 : 0)); // Boolean
    dest.writeInt(salesCount);
    dest.writeFloat(highestRating);
    dest.writeString(highestRatingDate);
    dest.writeInt(licenseType);
    dest.writeString(imageUrl);
    dest.writeByte((byte) (storeDownload ? 1 : 0)); // Boolean
    dest.writeByte((byte) (storePrint ? 1 : 0)); // Boolean

    dest.writeByte((byte) (voted ? 1 : 0)); // Boolean
    dest.writeByte((byte) (favorited ? 1 : 0)); // Boolean
    dest.writeByte((byte) (purchased ? 1 : 0)); // Boolean

    dest.writeParcelable(userBean, flags);
}