android.os.Parcel#writeIntArray ( )源码实例Demo

下面列出了android.os.Parcel#writeIntArray ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: v2ex-daily-android   文件: NodeModel.java
@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 });
}
 
源代码2 项目: data-mediator   文件: HistoryData.java
@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);
}
 
@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);
    }
}
 
源代码4 项目: ColorPicker   文件: ColorPreference.java
@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);
}
 
源代码5 项目: AppOpsX   文件: OpsCommands.java
@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);
}
 
/**
 * 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);
}
 
源代码7 项目: alpha-wallet-android   文件: MagicLinkParcel.java
@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));
}
 
源代码8 项目: buffer_bci   文件: ClientInfo.java
@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);
}
 
源代码9 项目: android_9.0.0_r45   文件: ActivityManager.java
@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);
}
 
源代码10 项目: android-recipes-app   文件: BackStackRecord.java
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);
}
 
@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);
}
 
源代码12 项目: color-picker   文件: ArrayPalette.java
@Override
public void writeToParcel(Parcel dest, int flags)
{
    dest.writeString(mPaletteId);
    dest.writeString(mPaletteName);
    dest.writeIntArray(mColors);
    dest.writeInt(mColumns);
    dest.writeStringArray(mColorNames);
}
 
源代码13 项目: Storm   文件: Configuration.java
@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());
}
 
源代码14 项目: FastAccess   文件: AppCompatColorPreference.java
@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);
}
 
@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);
}
 
源代码16 项目: buffer_bci   文件: BufferConnectionInfo.java
@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);
}
 
@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);
}
 
源代码18 项目: color-picker   文件: RandomPalette.java
@Override
public void writeToParcel(Parcel dest, int flags)
{
    dest.writeString(mName);
    dest.writeIntArray(mValues);
}
 
源代码19 项目: CodenameOne   文件: FragmentManager.java
public void writeToParcel(Parcel dest, int flags) {
    dest.writeTypedArray(mActive, flags);
    dest.writeIntArray(mAdded);
    dest.writeTypedArray(mBackStack, flags);
}
 
源代码20 项目: timecat   文件: MarkSizeView.java
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(pathX.size());
    dest.writeIntArray(getXArray());
    dest.writeIntArray(getYArray());
}
 
 方法所在类
 同类方法