android.os.Parcel.writeSparseArray()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中android.os.Parcel.writeSparseArray()方法的一些代码示例,展示了Parcel.writeSparseArray()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parcel.writeSparseArray()方法的具体详情如下:
包路径:android.os.Parcel
类名称:Parcel
方法名:writeSparseArray

Parcel.writeSparseArray介绍

[英]Flatten a generic SparseArray into the parcel at the current dataPosition(), growing dataCapacity() if needed. The SparseArray values are written using #writeValue and must follow the specification there.
[中]在当前dataPosition()处将通用SparseArray展平到包裹中,必要时增加dataCapacity()。SparseArray值是使用#writeValue写入的,并且必须遵循那里的规范。

代码示例

代码示例来源:origin: android-hacker/VirtualXposed

@Override
public void writeToParcel(Parcel dest, int flags) {
  dest.writeString(this.packageName);
  dest.writeString(this.apkPath);
  dest.writeString(this.libPath);
  dest.writeByte(this.dependSystem ? (byte) 1 : (byte) 0);
  dest.writeInt(this.appId);
  //noinspection unchecked
  dest.writeSparseArray((SparseArray) this.userState);
  dest.writeByte(this.skipDexOpt ? (byte) 1 : (byte) 0);
}

代码示例来源:origin: chentao0707/SimplifyReader

@Override
public void writeToParcel(Parcel dest, int flags) {
  dest.writeSparseArray(toSparseArray());
}

代码示例来源:origin: eneim/toro

@Override public void writeToParcel(Parcel dest, int flags) {
 super.writeToParcel(dest, flags);
 //noinspection unchecked
 dest.writeSparseArray(this.actualInfo);
}

代码示例来源:origin: kaushikgopal/rem

@Override
  public void writeToParcel(Parcel out, int flags) {
    out.writeSparseArray(_sparseArray);
  }
}

代码示例来源:origin: dbachelder/CreditCardEntry

@Override
public void writeToParcel(Parcel out, int flags) {
  super.writeToParcel(out, flags);
  out.writeSparseArray(childrenStates);
}

代码示例来源:origin: BoD/jraf-android-util

@Override
public void writeToParcel(Parcel out, int flags) {
  super.writeToParcel(out, flags);
  out.writeSparseArray(mValues);
}

代码示例来源:origin: dbachelder/CreditCardEntry

@SuppressWarnings("unchecked")
@Override
public void writeToParcel(Parcel out, int flags) {
  super.writeToParcel(out, flags);
  out.writeSparseArray(childrenStates);
}

代码示例来源:origin: bzsome/VirtualApp-x326

@Override
public void writeToParcel(Parcel dest, int flags) {
  dest.writeString(this.packageName);
  dest.writeString(this.apkPath);
  dest.writeString(this.libPath);
  dest.writeByte(this.dependSystem ? (byte) 1 : (byte) 0);
  dest.writeInt(this.appId);
  //noinspection unchecked
  dest.writeSparseArray((SparseArray) this.userState);
  dest.writeByte(this.skipDexOpt ? (byte) 1 : (byte) 0);
}

代码示例来源:origin: darkskygit/VirtualApp

@Override
public void writeToParcel(Parcel dest, int flags) {
  dest.writeString(this.packageName);
  dest.writeString(this.apkPath);
  dest.writeString(this.libPath);
  dest.writeByte(this.dependSystem ? (byte) 1 : (byte) 0);
  dest.writeInt(this.appId);
  //noinspection unchecked
  dest.writeSparseArray((SparseArray) this.userState);
  dest.writeByte(this.skipDexOpt ? (byte) 1 : (byte) 0);
}

代码示例来源:origin: aliumujib/Nibo

@Override
public void writeToParcel(Parcel out, int flags) {
  super.writeToParcel(out, flags);
  out.writeSparseArray(childrenStates);
  out.writeInt(mCurrentSearchViewState.toInt());
}

代码示例来源:origin: stackoverflow.com

public Test(Parcel in) {
   this.id = in.readInt();
   in.readSparseArray(OBJECT_STORED.class.getClassLoader());
} 

@Override
public void writeToParcel(Parcel dest, int flags) {
  dest.writeInt(this.id);
  dest.writeSparseArray(mSparseArray);
}

相关文章

Parcel类方法