本文整理了Java中android.os.Parcel.writeTypedList()
方法的一些代码示例,展示了Parcel.writeTypedList()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parcel.writeTypedList()
方法的具体详情如下:
包路径:android.os.Parcel
类名称:Parcel
方法名:writeTypedList
[英]Flatten a List containing a particular object type into the parcel, at the current dataPosition() and growing dataCapacity() if needed. The type of the objects in the list must be one that implements Parcelable. Unlike the generic writeList() method, however, only the raw data of the objects is written and not their type, so you must use the corresponding readTypedList() to unmarshall them.
[中]将包含特定对象类型的列表展平到地块中,在当前dataPosition()处,如果需要,增加dataCapacity()。列表中的对象类型必须是实现Parcelable的类型。但是,与一般的writeList()方法不同,只写入对象的原始数据,而不写入对象的类型,因此必须使用相应的readTypedList()对其进行解组。
代码示例来源:origin: yanzhenjie/NoHttp
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeTypedList(mDataList);
}
代码示例来源:origin: android-hacker/VirtualXposed
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(this.mode);
dest.writeParcelable(this.cell, flags);
dest.writeTypedList(this.allCell);
dest.writeTypedList(this.neighboringCell);
dest.writeParcelable(this.location, flags);
}
代码示例来源:origin: chentao0707/SimplifyReader
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(this.count);
dest.writeString(this.bucketName);
dest.writeTypedList(bucketList);
}
代码示例来源:origin: pockethub/PocketHub
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeParcelable(repository, flags);
dest.writeTypedList(labels);
dest.writeParcelable(milestone, flags);
dest.writeParcelable(assignee, flags);
dest.writeByte((byte) (open ? 1 : 0));
dest.writeString(direction);
dest.writeString(sortType);
}
}
代码示例来源:origin: prolificinteractive/material-calendarview
@Override
public void writeToParcel(@NonNull Parcel out, int flags) {
super.writeToParcel(out, flags);
out.writeInt(showOtherDates);
out.writeByte((byte) (allowClickDaysOutsideCurrentMonth ? 1 : 0));
out.writeParcelable(minDate, 0);
out.writeParcelable(maxDate, 0);
out.writeTypedList(selectedDates);
out.writeInt(topbarVisible ? 1 : 0);
out.writeInt(selectionMode);
out.writeInt(dynamicHeightEnabled ? 1 : 0);
out.writeParcelable(currentMonth, 0);
out.writeByte((byte) (cacheCurrentPosition ? 1 : 0));
}
代码示例来源:origin: gotev/android-upload-service
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.title);
dest.writeString(this.message);
dest.writeByte(this.autoClear ? (byte) 1 : (byte) 0);
dest.writeByte(this.clearOnAction ? (byte) 1 : (byte) 0);
dest.writeParcelable(this.largeIcon, flags);
dest.writeInt(this.iconResourceID);
dest.writeInt(this.iconColorResourceID);
dest.writeParcelable(this.clickIntent, flags);
dest.writeTypedList(this.actions);
}
代码示例来源: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: mttkay/ignition
/**
* @see com.github.droidfu.cachefu.CachedModel#writeToParcel(android.os.Parcel, int)
*/
@Override
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
// Write class name to parcel before object, so can be loaded correctly back in
dest.writeString(clazz.getCanonicalName());
dest.writeTypedList(list);
}
代码示例来源: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: jaydenxiao2016/AndroidFire
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.address);
dest.writeString(this.appointUserNickname);
dest.writeString(this.appointUserid);
dest.writeString(this.content);
dest.writeLong(this.createTime);
dest.writeInt(this.goodjobCount);
dest.writeString(this.id);
dest.writeString(this.isvalid);
dest.writeDouble(this.latitude);
dest.writeDouble(this.longitude);
dest.writeString(this.pictures);
dest.writeInt(this.replyCount);
dest.writeInt(this.type);
dest.writeString(this.icon);
dest.writeString(this.userId);
dest.writeString(this.nickName);
dest.writeTypedList(goodjobs);
dest.writeTypedList(replys);
dest.writeString(this.linkImg);
dest.writeString(this.linkTitle);
dest.writeInt(this.takeTimes);
}
代码示例来源:origin: Rukey7/MvpApp
dest.writeString(this.ptime);
dest.writeString(this.specialID);
dest.writeTypedList(this.ads);
dest.writeList(this.imgextra);
代码示例来源:origin: stackoverflow.com
outParcel.writeInt(myInt);
outParcel.writeString(str);
outParcel.writeTypedList(arrList);
代码示例来源:origin: stackoverflow.com
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(str);
dest.writeTypedList(list);
代码示例来源:origin: android-hacker/VirtualXposed
dest.writeInt(this.mVersionCode);
dest.writeInt(this.mSharedUserLabel);
dest.writeTypedList(this.configPreferences);
dest.writeTypedList(this.reqFeatures);
代码示例来源:origin: robolectric/robolectric
@Test
public void testWriteTypedListAndCreateTypedArrayList() throws Exception {
TestParcelable normal = new TestParcelable(23);
ArrayList<TestParcelable> normals = new ArrayList<>();
normals.add(normal);
parcel.writeTypedList(normals);
parcel.setDataPosition(0);
List<org.robolectric.shadows.TestParcelable> rehydrated = parcel
.createTypedArrayList(TestParcelable.CREATOR);
assertEquals(1, rehydrated.size());
assertEquals(23, rehydrated.get(0).contents);
}
代码示例来源:origin: android-hacker/VirtualXposed
List<JobInfo> _result = this.getAllPendingJobs();
reply.writeNoException();
reply.writeTypedList(_result);
return true;
代码示例来源:origin: jaredrummler/AndroidProcesses
@Override public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
dest.writeTypedList(groups);
}
代码示例来源:origin: guoxiaoxing/phoenix
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(this.fileType);
dest.writeByte(this.enableCamera ? (byte) 1 : (byte) 0);
dest.writeInt(this.theme);
dest.writeInt(this.maxPickNumber);
dest.writeInt(this.minPickNumber);
dest.writeInt(this.videoFilterTime);
dest.writeInt(this.mediaFilterSize);
dest.writeInt(this.recordVideoTime);
dest.writeInt(this.spanCount);
dest.writeInt(this.thumbnailWidth);
dest.writeInt(this.thumbnailHeight);
dest.writeByte(this.enableAnimation ? (byte) 1 : (byte) 0);
dest.writeByte(this.enableGif ? (byte) 1 : (byte) 0);
dest.writeByte(this.enablePreview ? (byte) 1 : (byte) 0);
dest.writeByte(this.pickNumberMode ? (byte) 1 : (byte) 0);
dest.writeByte(this.enableClickSound ? (byte) 1 : (byte) 0);
dest.writeByte(this.previewEggs ? (byte) 1 : (byte) 0);
dest.writeByte(this.enableCompress ? (byte) 1 : (byte) 0);
dest.writeInt(this.compressVideoFilterSize);
dest.writeInt(this.compressPictureFilterSize);
dest.writeTypedList(this.pickedMediaList);
dest.writeString(this.savePath);
}
代码示例来源:origin: WangDaYeeeeee/Mysplash
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(this.total);
dest.writeString(this.type);
dest.writeTypedList(this.results);
}
代码示例来源:origin: mingjunli/GithubApp
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeLong(this.total_count);
dest.writeByte(this.incomplete_results ? (byte) 1 : (byte) 0);
dest.writeTypedList(this.items);
}
内容来源于网络,如有侵权,请联系作者删除!