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

The following examples show how to use android.os.Parcel#writeIntArray() . These examples are extracted from open source projects. 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 Project: v2ex-daily-android   File: NodeModel.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeIntArray(new int[]{
            id,
            topics
    });
    String[] strings = new String[6];
    strings[0] = name;
    strings[1] = title;
    strings[2] = url;
    if((strings[3] = titleAlternative) == null){
        strings[3] = "";
    }
    if((strings[4] = header) == null){
        strings[4] = "";
    }
    if((strings[5] = footer) == null){
        strings[5] = "";
    }
    dest.writeStringArray(strings);
    dest.writeBooleanArray(new boolean[]{ isCollected });
}
 
Example 2
Source Project: data-mediator   File: HistoryData.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this.age);
    dest.writeLong(this.id);
    dest.writeInt(this.testShort);
    dest.writeByte(this.testByte);
    dest.writeByte(this.testBoolean ? (byte) 1 : (byte) 0);
    dest.writeFloat(this.testFloat);
    dest.writeDouble(this.testDouble);
    dest.writeInt(this.testChar);
    dest.writeValue(this.testLONG);
    dest.writeValue(this.testDOUBLE);
    dest.writeSerializable(this.testCharacter);
    dest.writeValue(this.testBOOLEAN);
    dest.writeValue(this.testSHORT);
    dest.writeString(this.name);
    dest.writeParcelable(this.data, flags);
    dest.writeTypedList(this.datas);
    dest.writeTypedArray(this.testArrayResultData, flags);
    dest.writeIntArray(this.testArrayInt);
    dest.writeArray(this.testArrayInteger);
}
 
Example 3
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(mPosition);
    dest.writeInt(mGapDir);
    dest.writeInt(mHasUnwantedGapAfter ? 1 : 0);
    if (mGapPerSpan != null && mGapPerSpan.length > 0) {
        dest.writeInt(mGapPerSpan.length);
        dest.writeIntArray(mGapPerSpan);
    } else {
        dest.writeInt(0);
    }
}
 
Example 4
Source Project: ColorPicker   File: ColorPreference.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    // Write the preference's values
    dest.writeInt(current);
    dest.writeIntArray(colors);
    dest.writeInt(columns);
    dest.writeByte((byte) (material ? 1 : 0));
    dest.writeByte((byte) (backwardsOrder ? 1 : 0));
    dest.writeInt(strokeWidth);
    dest.writeInt(strokeColor);
}
 
Example 5
Source Project: AppOpsX   File: OpsCommands.java    License: MIT License 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
  dest.writeString(this.action);
  dest.writeString(this.packageName);
  dest.writeInt(this.userHandleId);
  dest.writeInt(this.opInt);
  dest.writeInt(this.modeInt);
  dest.writeIntArray(this.ops);
  dest.writeByte(this.reqNet ? (byte) 1 : (byte) 0);
}
 
Example 6
/**
 * Used to package this object into a {@link Parcel}.
 *
 * @param dest The {@link Parcel} to be written.
 * @param flags The flags used for parceling.
 */
@Override
public void writeToParcel(Parcel dest, int flags) {
    final int infoSize = mSuggestionsInfos.length;
    dest.writeInt(infoSize);
    dest.writeTypedArray(mSuggestionsInfos, 0);
    dest.writeIntArray(mOffsets);
    dest.writeIntArray(mLengths);
}
 
Example 7
Source Project: alpha-wallet-android   File: MagicLinkParcel.java    License: MIT License 5 votes vote down vote up
@Override
public void writeToParcel(Parcel parcel, int i) {
    parcel.writeLong(magicLink.expiry);
    parcel.writeDouble(magicLink.price);
    parcel.writeInt(magicLink.ticketStart);
    parcel.writeInt(magicLink.ticketCount);
    parcel.writeString(magicLink.contractAddress);
    parcel.writeInt(magicLink.indices.length);
    parcel.writeIntArray(magicLink.indices);
    parcel.writeInt(magicLink.signature.length);
    parcel.writeByteArray(magicLink.signature);
    parcel.writeInt(magicLink.message.length);
    parcel.writeByteArray(magicLink.message);
    parcel.writeString(magicLink.priceWei.toString(10));
}
 
Example 8
@Override
public void writeToParcel(final Parcel out, final int flags) {
    // Gathering data
    final int[] integers = new int[]{clientID, samplesGotten, samplesPut,
            eventsGotten, eventsPut, lastActivity, waitEvents, waitSamples,
            error, diff};
    final long[] longs = new long[]{timeLastActivity, waitTimeout, time};

    // Write it to parcel
    out.writeString(address);
    out.writeIntArray(integers);
    out.writeLongArray(longs);
    out.writeInt(connected ? 1 : 0);
}
 
Example 9
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(stackId);
    dest.writeInt(bounds.left);
    dest.writeInt(bounds.top);
    dest.writeInt(bounds.right);
    dest.writeInt(bounds.bottom);
    dest.writeIntArray(taskIds);
    dest.writeStringArray(taskNames);
    final int boundsCount = taskBounds == null ? 0 : taskBounds.length;
    dest.writeInt(boundsCount);
    for (int i = 0; i < boundsCount; i++) {
        dest.writeInt(taskBounds[i].left);
        dest.writeInt(taskBounds[i].top);
        dest.writeInt(taskBounds[i].right);
        dest.writeInt(taskBounds[i].bottom);
    }
    dest.writeIntArray(taskUserIds);
    dest.writeInt(displayId);
    dest.writeInt(userId);
    dest.writeInt(visible ? 1 : 0);
    dest.writeInt(position);
    if (topActivity != null) {
        dest.writeInt(1);
        topActivity.writeToParcel(dest, 0);
    } else {
        dest.writeInt(0);
    }
    configuration.writeToParcel(dest, flags);
}
 
Example 10
public void writeToParcel(Parcel dest, int flags) {
    dest.writeIntArray(mOps);
    dest.writeInt(mTransition);
    dest.writeInt(mTransitionStyle);
    dest.writeString(mName);
    dest.writeInt(mIndex);
    dest.writeInt(mBreadCrumbTitleRes);
    TextUtils.writeToParcel(mBreadCrumbTitleText, dest, 0);
    dest.writeInt(mBreadCrumbShortTitleRes);
    TextUtils.writeToParcel(mBreadCrumbShortTitleText, dest, 0);
}
 
Example 11
@Override
public void writeToParcel(@NonNull Parcel parcel, int flags) {
  int size = size();
  int[] keys = new int[size];
  Parcelable[] values = new Parcelable[size];
  for (int i = 0; i < size; ++i) {
    keys[i] = keyAt(i);
    values[i] = valueAt(i);
  }
  parcel.writeInt(size);
  parcel.writeIntArray(keys);
  parcel.writeParcelableArray(values, flags);
}
 
Example 12
Source Project: color-picker   File: ArrayPalette.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags)
{
    dest.writeString(mPaletteId);
    dest.writeString(mPaletteName);
    dest.writeIntArray(mColors);
    dest.writeInt(mColumns);
    dest.writeStringArray(mColorNames);
}
 
Example 13
Source Project: Storm   File: Configuration.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {

    dest.writeIntArray(getOrdinals(orms));
    dest.writeIntArray(getOrdinals(opTypes));

    dest.writeIntArray(this.rounds);
    dest.writeInt(this.time == null ? -1 : this.time.ordinal());
}
 
Example 14
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    // Write the preference's values
    dest.writeInt(current);
    dest.writeIntArray(colors);
    dest.writeInt(columns);
}
 
Example 15
@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
  int[] keys = new int[size()];
  boolean[] values = new boolean[size()];

  for (int i = 0; i < size(); i++) {
    keys[i] = keyAt(i);
    values[i] = valueAt(i);
  }

  dest.writeInt(size());
  dest.writeIntArray(keys);
  dest.writeBooleanArray(values);
}
 
Example 16
@Override
public void writeToParcel(final Parcel out, final int flags) {
    // Gathering data
    final int[] integers = new int[]{connectionID, samplesGotten, samplesPut,
            eventsGotten, eventsPut, lastActivity, waitEvents, waitSamples,
            error, diff};
    final long[] longs = new long[]{timeLastActivity, waitTimeout, time};

    // Write it to parcel
    out.writeString(address);
    out.writeIntArray(integers);
    out.writeLongArray(longs);
    out.writeInt(connected ? 1 : 0);
}
 
Example 17
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeIntArray(this.a);
    dest.writeDoubleArray(this.b);
    dest.writeStringArray(this.c);
    dest.writeFloatArray(this.e);
    dest.writeBooleanArray(this.f);
    dest.writeByteArray(this.g);
}
 
Example 18
Source Project: color-picker   File: RandomPalette.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags)
{
    dest.writeString(mName);
    dest.writeIntArray(mValues);
}
 
Example 19
public void writeToParcel(Parcel dest, int flags) {
    dest.writeTypedArray(mActive, flags);
    dest.writeIntArray(mAdded);
    dest.writeTypedArray(mBackStack, flags);
}
 
Example 20
Source Project: timecat   File: MarkSizeView.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(pathX.size());
    dest.writeIntArray(getXArray());
    dest.writeIntArray(getYArray());
}