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

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

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

Parcel.readTypedArray介绍

暂无

代码示例

代码示例来源:origin: rey5137/material

/**
 * Constructor called from {@link #CREATOR}
 */
private SavedState(Parcel in) {
  super(in);
  int length = in.readInt();
  if(length > 0){
    recipients = new Recipient[length];
    in.readTypedArray(recipients, Recipient.CREATOR);
  }
}

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

public MyParcelableObject(Parcel in) {
  mMyArray = new MyOtherParcelableObject[in.readInt()];
  in.readTypedArray(mMyArray, MyOtherParcelableObject.CREATOR);
}

代码示例来源:origin: robotoworks/mechanoid

OpInfo(Parcel in) {
  mId = in.readInt();
  mCallbackInvoked = in.readInt() > 0;
  mResult = in.readParcelable(OperationResult.class.getClassLoader());
  int numInBatch = in.readInt();
  mIntents = new Intent[numInBatch];
  in.readTypedArray(mIntents, Intent.CREATOR);
}

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

MyClass[] mObjArray;

public void writeToParcel(Parcel out, int flags) {
  out.writeInt(mObjArray.length);
  out.writeTypedArray(mObjArray, flags);
}

protected MyClass(Parcel in) {
  int size = in.readInt();
  mObjArray = new MyClass[size];
  in.readTypedArray(mObjArray, MyClass.CREATOR);
}

代码示例来源:origin: TinkoffCreditSystems/decoro

protected SlotsList(Parcel in) {
  this.size = in.readInt();
  if (size > 0) {
    Slot[] slots = new Slot[this.size];
    in.readTypedArray(slots, Slot.CREATOR);
    linkSlots(slots, this);
  }
}

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

public void writeToParcel(Parcel out, int arg1) {
  out.writeInt(mObjList.length);
  out.writeTypedArray(mObjList, arg1);
}

private void readFromParcel(Parcel in) {
  int size = in.readInt();
  mObjList = in.readTypedArray(new MyClass[size], MyClass.CREATOR);
}

相关文章

Parcel类方法