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

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

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

Parcel.readList介绍

[英]Read into an existing List object from the parcel at the current dataPosition(), using the given class loader to load any enclosed Parcelables. If it is null, the default class loader is used.
[中]从当前dataPosition()处的地块读入现有列表对象,使用给定的类加载器加载任何封闭的地块。如果为null,则使用默认的类加载器。

代码示例

代码示例来源:origin: pockethub/PocketHub

protected IssueFilter(Parcel in) {
  repository = in.readParcelable(Repository.class.getClassLoader());
  labels = new ArrayList<>();
  in.readList(labels, Label.class.getClassLoader());
  milestone = in.readParcelable(Milestone.class.getClassLoader());
  assignee = in.readParcelable(User.class.getClassLoader());
  open = in.readByte() != 0;
  direction = in.readString();
  sortType = in.readString();
}

代码示例来源:origin: HotBitmapGG/bilibili-android-client

protected DataBean(Parcel in) {
  this.count = in.readInt();
  this.games = new ArrayList<GamesBean>();
  in.readList(this.games, GamesBean.class.getClassLoader());
}

代码示例来源:origin: HotBitmapGG/bilibili-android-client

protected DataBean(Parcel in) {
  this.pages = in.readInt();
  this.count = in.readInt();
  this.list = new ArrayList<ListBean>();
  in.readList(this.list, ListBean.class.getClassLoader());
}

代码示例来源:origin: HotBitmapGG/bilibili-android-client

protected DataBean(Parcel in) {
  this.total_count = in.readInt();
  this.total_page = in.readInt();
  this.result = new ArrayList<ResultBean>();
  in.readList(this.result, ResultBean.class.getClassLoader());
}

代码示例来源:origin: HotBitmapGG/bilibili-android-client

protected DataBean(Parcel in) {
  this.count = in.readInt();
  this.pages = in.readInt();
  this.vlist = new ArrayList<VlistBean>();
  in.readList(this.vlist, VlistBean.class.getClassLoader());
}

代码示例来源:origin: gotev/android-upload-service

private HttpUploadTaskParameters(Parcel in) {
  method = in.readString();
  customUserAgent = in.readString();
  usesFixedLengthStreamingMode = in.readByte() == 1;
  in.readList(requestHeaders, NameValue.class.getClassLoader());
  in.readList(requestParameters, NameValue.class.getClassLoader());
}

代码示例来源:origin: jaydenxiao2016/AndroidFire

protected NewsPhotoDetail(Parcel in) {
  this.title = in.readString();
  this.pictures = new ArrayList<>();
  in.readList(this.pictures, Picture.class.getClassLoader());
}

代码示例来源:origin: HotBitmapGG/bilibili-android-client

protected RegionTypesInfo(Parcel in) {
  this.code = in.readInt();
  this.message = in.readString();
  this.ver = in.readString();
  this.data = new ArrayList<DataBean>();
  in.readList(this.data, DataBean.class.getClassLoader());
}

代码示例来源:origin: HotBitmapGG/bilibili-android-client

protected DataBean(Parcel in) {
  this.tid = in.readInt();
  this.reid = in.readInt();
  this.name = in.readString();
  this.logo = in.readString();
  this.gotoX = in.readString();
  this.param = in.readString();
  this.children = new ArrayList<ChildrenBean>();
  in.readList(this.children, ChildrenBean.class.getClassLoader());
}

代码示例来源:origin: gotev/android-upload-service

private UploadTaskParameters(Parcel in) {
  id = in.readString();
  serverUrl = in.readString();
  maxRetries = in.readInt();
  autoDeleteSuccessfullyUploadedFiles = in.readByte() == 1;
  notificationConfig = in.readParcelable(UploadNotificationConfig.class.getClassLoader());
  in.readList(files, UploadFile.class.getClassLoader());
}

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

public class ClassABC implements Parcelable {

 private List<MyClass> mObjList; // MyClass should implement Parcelable properly

 // ==================== Parcelable ====================
 public int describeContents() {
  return 0;
 }

 public void writeToParcel(Parcel out, int flags) {
  out.writeList(mObjList);
 }

 private ClassABC(Parcel in) {
  mObjList = new ArrayList<MyClass>();
  in.readList(mObjList, getClass().getClassLoader());
  }

 public static final Parcelable.Creator<ClassABC> CREATOR = new Parcelable.Creator<ClassABC>() {
  public ClassABC createFromParcel(Parcel in) {
   return new ClassABC(in);
  }
  public ClassABC[] newArray(int size) {
   return new ClassABC[size];
  }
 };

}

代码示例来源:origin: arimorty/floatingsearchview

private SavedState(Parcel in) {
  super(in);
  in.readList(suggestions, getClass().getClassLoader());
  isFocused = (in.readInt() != 0);
  query = in.readString();
  queryTextSize = in.readInt();
  suggestionTextSize = in.readInt();
  searchHint = in.readString();
  dismissOnOutsideClick = (in.readInt() != 0);
  showMoveSuggestionUpBtn = (in.readInt() != 0);
  showSearchKey = (in.readInt() != 0);
  isTitleSet = (in.readInt() != 0);
  backgroundColor = in.readInt();
  suggestionsTextColor = in.readInt();
  queryTextColor = in.readInt();
  searchHintTextColor = in.readInt();
  actionOverflowMenuColor = in.readInt();
  menuItemIconColor = in.readInt();
  leftIconColor = in.readInt();
  clearBtnColor = in.readInt();
  suggestionUpBtnColor = in.readInt();
  dividerColor = in.readInt();
  menuId = in.readInt();
  leftActionMode = in.readInt();
  dimBackground = (in.readInt() != 0);
  suggestionsSectionAnimSuration = in.readLong();
  dismissOnSoftKeyboardDismiss = (in.readInt() != 0);
  dismissFocusOnSuggestionItemClick = (in.readInt() != 0);
}

代码示例来源:origin: jaydenxiao2016/AndroidFire

this.ptime = in.readString();
this.ads = new ArrayList<AdsBean>();
in.readList(this.ads, AdsBean.class.getClassLoader());
this.imgextra = new ArrayList<ImgextraBean>();
in.readList(this.imgextra, ImgextraBean.class.getClassLoader());

代码示例来源:origin: Rukey7/MvpApp

this.ads = in.createTypedArrayList(AdData.CREATOR);
this.imgextra = new ArrayList<ImgExtraData>();
in.readList(this.imgextra, ImgExtraData.class.getClassLoader());

代码示例来源:origin: kaku2015/ColorfulNews

protected NewsPhotoDetail(Parcel in) {
  this.title = in.readString();
  this.pictures = new ArrayList<>();
  in.readList(this.pictures, Picture.class.getClassLoader());
}

代码示例来源:origin: thoughtbot/expandable-recycler-view

protected ExpandableGroup(Parcel in) {
 title = in.readString();
 byte hasItems = in.readByte();
 int size = in.readInt();
 if (hasItems == 0x01) {
  items = new ArrayList<T>(size);
  Class<?> type = (Class<?>) in.readSerializable();
  in.readList(items, type.getClassLoader());
 } else {
  items = null;
 }
}

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

public enum Improvement {ENUM1, ENUM2, etc}

public void writeToParcel(Parcel dest, int flags) {
  ...
  List<String> improvementStrings = new ArrayList<String>();
  for (Improvement improvement : improvements) {
    improvementStrings.add(improvement.name());
  }
  dest.writeList(improvementStrings);
}

public void readFromParcel(Parcel in) {
  ...
  List<String> improvementStrings = new ArrayList<String>();
  in.readList(improvementStrings, null);
  for (String improvementString : improvementStrings) {
    improvements.add(Improvement.valueOf(improvementString));
  }
}

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

in.readList(items, type.getClassLoader());

代码示例来源:origin: iZeroer/Daily

protected NewsPhotoDetail(Parcel in) {
  this.title = in.readString();
  this.mPictures = new ArrayList<>();
  in.readList(this.mPictures, Picture.class.getClassLoader());
}

代码示例来源:origin: tvbarthel/ChaseWhisplyProject

@Override
public void readFromParcel(Parcel in) {
  super.readFromParcel(in);
  mCurrentWave = in.readInt();
  mCursor = in.readInt();
  mState = in.readInt();
  mGhostTypeList = new ArrayList<Integer>();
  in.readList(mGhostTypeList, Integer.class.getClassLoader());
}

相关文章

Parcel类方法