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

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

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

Parcel.readTypedList介绍

[英]Read into the given List items containing a particular object type that were written with #writeTypedList at the current dataPosition(). The list must have previously been written via #writeTypedList with the same object type.
[中]读入包含特定对象类型的给定列表项,该对象类型是在当前dataPosition()处用#writeTypedList写入的。列表必须以前使用相同的对象类型通过#writeTypedList写入。

代码示例

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

private Chapitre(){
  listVideo = new ArrayList<Video>();
}

private Chapitre(Parcel source) {
  // Call the above constructor
  this();

  numero = source.readInt();
  titre = source.readString();
  description = source.readString();
  nbVideo = source.readInt();
  source.readTypedList(listeVideo, Video.CREATOR);
}

代码示例来源:origin: prolificinteractive/material-calendarview

private SavedState(Parcel in) {
  super(in);
  showOtherDates = in.readInt();
  allowClickDaysOutsideCurrentMonth = in.readByte() != 0;
  ClassLoader loader = CalendarDay.class.getClassLoader();
  minDate = in.readParcelable(loader);
  maxDate = in.readParcelable(loader);
  in.readTypedList(selectedDates, CalendarDay.CREATOR);
  topbarVisible = in.readInt() == 1;
  selectionMode = in.readInt();
  dynamicHeightEnabled = in.readInt() == 1;
  currentMonth = in.readParcelable(loader);
  cacheCurrentPosition = in.readByte() != 0;
 }
}

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

public void writeToParcel(Parcel out, int flags) {
  out.writeTypedList(mObjList);
}
private ClassABC(Parcel in) {
  mObjList = new ArrayList<ClassABC>();
  in.readTypedList(mObjList, ClassABC.CREATOR);
}

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

public void writeToParcel(Parcel out, int flags) {
  out.writeString(_mac);
  out.writeString(_pan);
  out.writeInt(_band);
  out.writeSerializable(_lqis);
  out.writeTypedList(_devices);
}

private ZigBeeNetwork(Parcel in) {
  _mac = in.readString();
  _pan = in.readString();
  _band = in.readInt();
  _lqis = (ArrayList<Integer>) in.readSerializable();
  in.readTypedList(_devices, ZigBeeDev.CREATOR);
}

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

myInt = in.readInt();
str = in.readString();
in.readTypedList(arrList, MyListClass.CREATOR);

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

in.readTypedList(list, B.CREATOR);

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

public MyParcelable(Parcel in) {
  myInt = in.readInt();
  arrList = new ArrayList<MyListClass>();
  in.readTypedList(arrList, MyListClass.CREATOR);
}

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

private TestSample(Parcel in) {
   intValue = in.readInt();
   stirngValue=in.readString();
   cpls = new ArrayList<DocumentControlPolicy>();//The code you missed.. 
   in.readTypedList(cpls,DocumentControlPolicy.CREATOR);
 }

代码示例来源:origin: ZhangQinhao/MONKOVEL

protected DownloadChapterListBean(Parcel in) {
  if(data == null)
    data = new ArrayList<>();
  in.readTypedList(data,DownloadChapterBean.CREATOR);
}

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

// PARCELABLE
public Entry(Parcel source){
  date = source.readString();
  source.readTypedList(itches, Itch.CREATOR);
}

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

private Timetable(Parcel in)
{
  // readTypeList() needs an existing List<> to load.
  timetable = new ArrayList<Lap>();
  loggedLocations = new ArrayList<Location>();

  actLap          = in.readInt();
  in.readTypedList(timetable, Lap.CREATOR);
  in.readTypedList(loggedLocations, Location.CREATOR);
  ...

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

public CustomSmall(Parcel in){
  Log.d(TAG,"CustomSmall(Parcel in)");
  mId = in.readInt();
  mName = in.readString();
  mDummy = in.readInt();
  mStringList = new ArrayList<>();
  in.readTypedList(mStringList,MyString.CREATOR);
}

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

@Override
public void readFromParcel(Parcel in) {
  super.readFromParcel(in);
  mScoreInformation = in.readParcelable(ScoreInformation.class.getClassLoader());
  mWeapon = in.readParcelable(Weapon.class.getClassLoader());
  mCurrentTarget = in.readParcelable(TargetableItem.class.getClassLoader());
  mTargetableItems = new ArrayList<TargetableItem>();
  in.readTypedList(mTargetableItems, TargetableItem.CREATOR);
  mDisplayableItems = new ArrayList<DisplayableItem>();
  in.readTypedList(mDisplayableItems, DisplayableItem.CREATOR);
}

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

public MyClass1(Parcel in) {
 mVar1 = in.readInt();
 mVar2 = in.readInt();
 mVar3 = in.readInt();
 mVar5 = in.readLong();
 mVar6 = in.readLong();
 mVar8 = in.readString();
 mVar9 = in.readString();
 mVar10 = in.readString();
 mVar11 = new ArrayList<MyClass2>();
 in.readTypedList(mVar11, MyClass2.CREATOR);
 mVar7 = in.readString();
}

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

public void writeToParcel(Parcel arg0, int arg1) {
  arg0.writeTypedList(arraylist1); 

  arg0.writeParcelable(object1, arg1);
  arg0.writeParcelable(object2, arg1);
}

public void readFromParcel(Parcel in) {
  arraylist1 = new ArrayList<object3>();
  in.readTypedList(arraylist1, object3.CREATOR);

  object1  = in.readParcelable(object1.class.getClassLoader());
  object2 = in.readParcelable(object2.class.getClassLoader());
}

代码示例来源:origin: andforce/iBeebo

public NearbyStatusListBean createFromParcel(Parcel in) {
  NearbyStatusListBean nearbyStatusListBean = new NearbyStatusListBean();
  nearbyStatusListBean.total_number = in.readInt();
  nearbyStatusListBean.previous_cursor = in.readString();
  nearbyStatusListBean.next_cursor = in.readString();
  nearbyStatusListBean.statuses = new ArrayList<MessageBean>();
  in.readTypedList(nearbyStatusListBean.statuses, MessageBean.CREATOR);
  return nearbyStatusListBean;
}

代码示例来源:origin: andforce/iBeebo

public UserListBean createFromParcel(Parcel in) {
  UserListBean userListBean = new UserListBean();
  userListBean.total_number = in.readInt();
  userListBean.previous_cursor = in.readInt();
  userListBean.next_cursor = in.readInt();
  userListBean.users = new ArrayList<UserBean>();
  in.readTypedList(userListBean.users, UserBean.CREATOR);
  return userListBean;
}

代码示例来源:origin: andforce/iBeebo

public RepostListBean createFromParcel(Parcel in) {
  RepostListBean repostListBean = new RepostListBean();
  repostListBean.total_number = in.readInt();
  repostListBean.previous_cursor = in.readString();
  repostListBean.next_cursor = in.readString();
  repostListBean.reposts = new ArrayList<MessageBean>();
  in.readTypedList(repostListBean.reposts, MessageBean.CREATOR);
  return repostListBean;
}

代码示例来源:origin: andforce/iBeebo

public TopicResultListBean createFromParcel(Parcel in) {
  TopicResultListBean topicResultListBean = new TopicResultListBean();
  topicResultListBean.total_number = in.readInt();
  topicResultListBean.previous_cursor = in.readString();
  topicResultListBean.next_cursor = in.readString();
  topicResultListBean.statuses = new ArrayList<MessageBean>();
  in.readTypedList(topicResultListBean.statuses, MessageBean.CREATOR);
  return topicResultListBean;
}

代码示例来源:origin: andforce/iBeebo

public SearchStatusListBean createFromParcel(Parcel in) {
  SearchStatusListBean searchStatusListBean = new SearchStatusListBean();
  searchStatusListBean.total_number = in.readInt();
  searchStatusListBean.previous_cursor = in.readString();
  searchStatusListBean.next_cursor = in.readString();
  searchStatusListBean.statuses = new ArrayList<MessageBean>();
  in.readTypedList(searchStatusListBean.statuses, MessageBean.CREATOR);
  return searchStatusListBean;
}

相关文章

Parcel类方法