本文整理了Java中android.os.Parcel.readSerializable()
方法的一些代码示例,展示了Parcel.readSerializable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parcel.readSerializable()
方法的具体详情如下:
包路径:android.os.Parcel
类名称:Parcel
方法名:readSerializable
[英]Read and return a new Serializable object from the parcel.
[中]从包裹中读取并返回新的可序列化对象。
代码示例来源:origin: android-hacker/VirtualXposed
protected Problem(Parcel in) {
this.e = (Throwable) in.readSerializable();
}
代码示例来源:origin: wdullaer/MaterialDateTimePicker
@SuppressWarnings({"unchecked", "WeakerAccess"})
public DefaultDateRangeLimiter(Parcel in) {
mMinYear = in.readInt();
mMaxYear = in.readInt();
mMinDate = (Calendar) in.readSerializable();
mMaxDate = (Calendar) in.readSerializable();
selectableDays = (TreeSet<Calendar>) in.readSerializable();
disabledDays = (HashSet<Calendar>) in.readSerializable();
}
代码示例来源:origin: lingochamp/FileDownloader
ErrorMessageSnapshot(Parcel in) {
super(in);
this.sofarBytes = in.readLong();
this.throwable = (Throwable) in.readSerializable();
}
}
代码示例来源:origin: lingochamp/FileDownloader
ErrorMessageSnapshot(Parcel in) {
super(in);
this.sofarBytes = in.readInt();
this.throwable = (Throwable) in.readSerializable();
}
}
代码示例来源:origin: facebook/facebook-android-sdk
AppGroupCreationContent(final Parcel in) {
this.name = in.readString();
this.description = in.readString();
this.privacy = (AppGroupPrivacy) in.readSerializable();
}
代码示例来源:origin: facebook/facebook-android-sdk
ShareMessengerGenericTemplateContent(Parcel in) {
super(in);
this.isSharable = (in.readByte() != 0);
this.imageAspectRatio = (ImageAspectRatio) in.readSerializable();
this.genericTemplateElement = in.readParcelable(
ShareMessengerGenericTemplateElement.class.getClassLoader());
}
代码示例来源:origin: facebook/facebook-android-sdk
ShareMessengerMediaTemplateContent(final Parcel in) {
super(in);
this.mediaType = (MediaType) in.readSerializable();
this.attachmentId = in.readString();
this.mediaUrl = in.readParcelable(Uri.class.getClassLoader());
this.button = in.readParcelable(ShareMessengerActionButton.class.getClassLoader());
}
代码示例来源:origin: facebook/facebook-android-sdk
ShareMessengerURLActionButton(final Parcel in) {
super(in);
this.url = in.readParcelable(Uri.class.getClassLoader());
this.isMessengerExtensionURL = (in.readByte() != 0);
this.fallbackUrl = in.readParcelable(Uri.class.getClassLoader());
this.webviewHeightRatio = (WebviewHeightRatio) in.readSerializable();
this.shouldHideWebviewShareButton = (in.readByte() != 0);
}
代码示例来源:origin: stackoverflow.com
@Override
public void writeToParcel(Parcel out, int flags) {
// Write object
out.writeSerializable(date_object);
}
private void readFromParcel(Parcel in) {
// Read object
date_object = (java.util.Date) in.readSerializable();
}
代码示例来源:origin: k9mail/k-9
private Attachment(Parcel in) {
uri = in.readParcelable(Uri.class.getClassLoader());
state = (LoadingState) in.readSerializable();
loaderId = in.readInt();
contentType = in.readString();
allowMessageType = in.readInt() != 0;
name = in.readString();
if (in.readInt() != 0) {
size = in.readLong();
} else {
size = null;
}
filename = in.readString();
}
代码示例来源:origin: ArthurHub/Android-Image-Cropper
protected ActivityResult(Parcel in) {
super(
null,
(Uri) in.readParcelable(Uri.class.getClassLoader()),
null,
(Uri) in.readParcelable(Uri.class.getClassLoader()),
(Exception) in.readSerializable(),
in.createFloatArray(),
(Rect) in.readParcelable(Rect.class.getClassLoader()),
(Rect) in.readParcelable(Rect.class.getClassLoader()),
in.readInt(),
in.readInt());
}
代码示例来源:origin: gotev/android-upload-service
@SuppressWarnings("unchecked")
protected ServerResponse(Parcel in) {
httpCode = in.readInt();
body = new byte[in.readInt()];
in.readByteArray(body);
headers = (LinkedHashMap<String, String>) in.readSerializable();
}
代码示例来源:origin: facebook/facebook-android-sdk
GameRequestContent(final Parcel in) {
this.message = in.readString();
this.recipients = in.createStringArrayList();
this.title = in.readString();
this.data = in.readString();
this.actionType = (ActionType) in.readSerializable();
this.objectId = in.readString();
this.filters = (Filters) in.readSerializable();
this.suggestions = in.createStringArrayList();
in.readStringList(this.suggestions);
}
代码示例来源:origin: gotev/android-upload-service
private BroadcastData(Parcel in) {
status = Status.values()[in.readInt()];
exception = (Exception) in.readSerializable();
uploadInfo = in.readParcelable(UploadInfo.class.getClassLoader());
serverResponse = in.readParcelable(ServerResponse.class.getClassLoader());
}
代码示例来源: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: robolectric/robolectric
@Implementation
protected static Bitmap nativeCreateFromParcel(Parcel p) {
int parceledWidth = p.readInt();
int parceledHeight = p.readInt();
Bitmap.Config parceledConfig = (Bitmap.Config) p.readSerializable();
int[] parceledColors = new int[parceledHeight * parceledWidth];
p.readIntArray(parceledColors);
return createBitmap(parceledColors, parceledWidth, parceledHeight, parceledConfig);
}
代码示例来源:origin: gotev/android-upload-service
@SuppressWarnings("unchecked")
private UploadFile(Parcel in) {
this.path = in.readString();
this.properties = (LinkedHashMap<String, String>) in.readSerializable();
try {
this.handler = SchemeHandlerFactory.getInstance().get(path);
} catch (Exception exc) {
throw new RuntimeException(exc);
}
}
代码示例来源:origin: igreenwood/SimpleCropView
private SavedState(Parcel in) {
super(in);
mode = (CropMode) in.readSerializable();
backgroundColor = in.readInt();
overlayColor = in.readInt();
frameColor = in.readInt();
guideShowMode = (ShowMode) in.readSerializable();
handleShowMode = (ShowMode) in.readSerializable();
showGuide = (in.readInt() != 0);
showHandle = (in.readInt() != 0);
sourceUri = in.readParcelable(Uri.class.getClassLoader());
saveUri = in.readParcelable(Uri.class.getClassLoader());
compressFormat = (Bitmap.CompressFormat) in.readSerializable();
compressQuality = in.readInt();
isDebug = (in.readInt() != 0);
代码示例来源:origin: FolioReader/FolioReader-Android
private void readFromParcel(Parcel in) {
id = in.readInt();
bookId = in.readString();
pageId = in.readString();
rangy = in.readString();
content = in.readString();
date = (Date) in.readSerializable();
type = in.readString();
pageNumber = in.readInt();
note = in.readString();
uuid = in.readString();
}
代码示例来源: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;
}
}
内容来源于网络,如有侵权,请联系作者删除!