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

The following examples show how to use android.os.Parcel#writeParcelable() . 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: AnimationRect.java    From iBeebo with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeParcelable(scaledBitmapRect, flags);
    dest.writeParcelable(imageViewEntireRect, flags);
    dest.writeParcelable(imageViewVisibleRect, flags);
    dest.writeInt(type);
    dest.writeBooleanArray(new boolean[]{
            isTotalVisible
    });
    dest.writeBooleanArray(new boolean[]{
            isTotalInvisible
    });
    dest.writeBooleanArray(new boolean[]{
            isScreenPortrait
    });
    dest.writeFloat(thumbnailWidthHeightRatio);
    dest.writeInt(thumbnailWidth);
    dest.writeInt(thumbnailHeight);
    dest.writeInt(widgetWidth);
    dest.writeInt(widgetHeight);
    dest.writeFloat(clipByParentRectTop);
    dest.writeFloat(clipByParentRectBottom);
    dest.writeFloat(clipByParentRectLeft);
    dest.writeFloat(clipByParentRectRight);
}
 
Example 2
Source File: Comment.java    From mvvm-template with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeLong(this.id);
    dest.writeParcelable(this.user, flags);
    dest.writeString(this.url);
    dest.writeString(this.body);
    dest.writeString(this.bodyHtml);
    dest.writeString(this.htmlUrl);
    dest.writeLong(this.createdAt != null ? this.createdAt.getTime() : -1);
    dest.writeLong(this.updatedAt != null ? this.updatedAt.getTime() : -1);
    dest.writeInt(this.position);
    dest.writeInt(this.line);
    dest.writeString(this.path);
    dest.writeString(this.commitId);
    dest.writeString(this.repoId);
    dest.writeString(this.login);
    dest.writeString(this.gistId);
    dest.writeString(this.issueId);
    dest.writeString(this.pullRequestId);
    dest.writeParcelable(this.reactions, flags);
    dest.writeString(this.authorAssociation);
}
 
Example 3
Source File: MediaWrapper.java    From OTTLivePlayer_vlc with MIT License 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeParcelable(mUri, flags);
    dest.writeLong(getTime());
    dest.writeLong(getLength());
    dest.writeInt(getType());
    dest.writeParcelable(getPicture(), flags);
    dest.writeString(getTitle());
    dest.writeString(getArtist());
    dest.writeString(getGenre());
    dest.writeString(getAlbum());
    dest.writeString(getAlbumArtist());
    dest.writeInt(getWidth());
    dest.writeInt(getHeight());
    dest.writeString(getArtworkURL());
    dest.writeInt(getAudioTrack());
    dest.writeInt(getSpuTrack());
    dest.writeInt(getTrackNumber());
    dest.writeInt(getDiscNumber());
    dest.writeLong(getLastModified());
    dest.writeLong(getSeen());

    if (mSlaves != null) {
        PSlave pslaves[] = new PSlave[mSlaves.length];
        for (int i = 0; i < mSlaves.length; ++i) {
            pslaves[i] = new PSlave(mSlaves[i]);
        }
        dest.writeTypedArray(pslaves, flags);
    }
    else
        dest.writeTypedArray(null, flags);
}
 
Example 4
Source File: CropConfigParcelable.java    From YImagePicker with Apache License 2.0 5 votes vote down vote up
/**
 * Flatten this object in to a Parcel.
 *
 * @param dest  The Parcel in which the object should be written.
 * @param flags Additional flags about how the object should be written.
 *              May be 0 or {@link #PARCELABLE_WRITE_RETURN_VALUE}.
 */
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(cropRatioX);
    dest.writeInt(cropRatioY);
    dest.writeByte((byte) (isCircle ? 1 : 0));
    dest.writeInt(cropRectMargin);
    dest.writeInt(cropStyle);
    dest.writeInt(cropGapBackgroundColor);
    dest.writeByte((byte) (saveInDCIM ? 1 : 0));
    dest.writeLong(maxOutPutByte);
    dest.writeByte((byte) (isLessOriginalByte ? 1 : 0));
    dest.writeParcelable(cropRestoreInfo, flags);
    dest.writeByte((byte) (isSingleCropCutNeedTop ? 1 : 0));
}
 
Example 5
Source File: Comment.java    From NClientV2 with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(id);
    dest.writeParcelable(poster, flags);
    dest.writeString(body);
    dest.writeLong(postDate.getTime());
}
 
Example 6
Source File: Metadata.java    From K-Sonic with MIT License 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
  dest.writeInt(entries.length);
  for (Entry entry : entries) {
    dest.writeParcelable(entry, 0);
  }
}
 
Example 7
Source File: Route.java    From GoogleDirectionLibrary with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel parcel, int i) {
    parcel.writeParcelable(bound, i);
    parcel.writeString(copyrights);
    parcel.writeParcelable(overviewPolyline, i);
    parcel.writeString(summary);
    parcel.writeParcelable(fare, i);
    parcel.writeStringList(warningList);
}
 
Example 8
Source File: DiscoveredBluetoothDevice.java    From mcumgr-android with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(final Parcel parcel, final int flags) {
    parcel.writeParcelable(device, flags);
    parcel.writeParcelable(lastScanResult, flags);
    parcel.writeString(name);
    parcel.writeInt(rssi);
    parcel.writeInt(previousRssi);
    parcel.writeInt(highestRssi);
}
 
Example 9
Source File: TrafficHistory.java    From bitmask_android with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeList(trafficHistorySeconds);
    dest.writeList(trafficHistoryMinutes);
    dest.writeList(trafficHistoryHours);
    dest.writeParcelable(lastSecondUsedForMinute, 0);
    dest.writeParcelable(lastMinuteUsedForHours, 0);

}
 
Example 10
Source File: Album.java    From spotify-web-api-android with MIT License 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeTypedList(artists);
    dest.writeTypedList(copyrights);
    dest.writeMap(this.external_ids);
    dest.writeStringList(this.genres);
    dest.writeValue(this.popularity);
    dest.writeString(this.release_date);
    dest.writeString(this.release_date_precision);
    dest.writeParcelable(this.tracks, flags);
}
 
Example 11
Source File: StatusDraftBean.java    From iBeebo with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(content);
    dest.writeString(pic);
    dest.writeParcelable(gps, flags);
    dest.writeString(accountId);
    dest.writeString(id);
}
 
Example 12
Source File: OperationStep.java    From SoloPi with Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeParcelable(operationNode, flags);
    dest.writeParcelable(operationMethod, flags);
    dest.writeInt(operationIndex);
    dest.writeString(operationId);
    dest.writeString(stepId);
}
 
Example 13
Source File: CustomViewPager.java    From youqu_master with Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel out, int flags) {
    super.writeToParcel(out, flags);
    out.writeInt(position);
    out.writeParcelable(adapterState, flags);
}
 
Example 14
Source File: ClassLoaderSavedState.java    From PullToRefreshLibrary with Apache License 2.0 4 votes vote down vote up
public void writeToParcel(Parcel dest, int flags) {
    dest.writeParcelable(mSuperState, flags);
}
 
Example 15
Source File: PhyResult.java    From Android-BLE-Library with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
@Override
public void writeToParcel(final Parcel dest, final int flags) {
	dest.writeParcelable(device, flags);
	dest.writeInt(txPhy);
	dest.writeInt(rxPhy);
}
 
Example 16
Source File: VerticalViewPager.java    From DoubleViewPager with Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel out, int flags) {
    super.writeToParcel(out, flags);
    out.writeInt(position);
    out.writeParcelable(adapterState, flags);
}
 
Example 17
Source File: LazyViewPager.java    From AndroidBase with Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel out, int flags) {
    super.writeToParcel(out, flags);
    out.writeInt(position);
    out.writeParcelable(adapterState, flags);
}
 
Example 18
Source File: AuthResponseBean.java    From monolog-android with MIT License 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.token);
    dest.writeParcelable(this.user, 0);
}
 
Example 19
Source File: AndroidViewModel.java    From squidb with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeParcelable((ContentValuesStorage) setValues, 0);
    dest.writeParcelable((ContentValuesStorage) values, 0);
}
 
Example 20
Source File: LargePreviewSet.java    From EhViewer with Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeParcelable(this.mPositionList, flags);
    dest.writeStringList(this.mImageUrlList);
    dest.writeStringList(this.mPageUrlList);
}