本文整理汇总了Java中android.os.Parcel.readSerializable方法的典型用法代码示例。如果您正苦于以下问题:Java Parcel.readSerializable方法的具体用法?Java Parcel.readSerializable怎么用?Java Parcel.readSerializable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.os.Parcel
的用法示例。
在下文中一共展示了Parcel.readSerializable方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readFromParcel
import android.os.Parcel; //导入方法依赖的package包/类
public void readFromParcel(Parcel in){
String tit = in.readString();
if (tit == null || tit.isEmpty()) {
throw new IllegalArgumentException("El titulo no puede ser nulo ni vacio"); //$NON-NLS-1$
}
this.title = tit;
this.promoter = in.readString();
this.banner = new byte[in.readInt()];
in.readByteArray(this.banner);
this.initDate = (Date) in.readSerializable();
this.endDate = (Date) in.readSerializable();
this.numRequiredSignatures = in.readInt();
this.id = in.readInt();
try {
this.promoterUrl = new URL(in.readString());
} catch (MalformedURLException e) {
e.printStackTrace();
}
this.numActualSignatures = in.readInt();
this.howtoSolveAsHtml = in.readString();
}
示例2: Attachment
import android.os.Parcel; //导入方法依赖的package包/类
private Attachment(Parcel in) {
uri = in.readParcelable(Uri.class.getClassLoader());
state = (LoadingState) in.readSerializable();
loaderId = in.readInt();
contentType = in.readString();
name = in.readString();
if (in.readInt() != 0) {
size = in.readLong();
} else {
size = null;
}
filename = in.readString();
}
示例3: Post
import android.os.Parcel; //导入方法依赖的package包/类
private Post(Parcel in) {
this.by = in.readString();
this.id = (Long) in.readValue(Long.class.getClassLoader());
this.time = (Long) in.readValue(Long.class.getClassLoader());
this.kids = (ArrayList<Long>) in.readSerializable();
this.url = in.readString();
this.score = (Long) in.readValue(Long.class.getClassLoader());
this.title = in.readString();
this.text = in.readString();
int tmpStoryType = in.readInt();
this.postType = tmpStoryType == -1 ? null : PostType.values()[tmpStoryType];
}
示例4: AlarmRecord
import android.os.Parcel; //导入方法依赖的package包/类
protected AlarmRecord(Parcel in) {
this.mIndex = in.readLong();
this.mActionType = in.readInt();
this.mAlarmTime = in.readParcelable(AlarmTime.class.getClassLoader());
this.mRecordTime = (LunarCalendar) in.readSerializable();
this.mYear = in.readInt();
this.mMonth = in.readInt();
this.mDay = in.readInt();
this.mTitle = in.readString();
this.mContent = in.readString();
this.mDisplay = in.readByte() != 0;
this.mPause = in.readByte() != 0;
this.mCreateTime = (Calendar) in.readSerializable();
this.mIsNew = in.readByte() != 0;
}
示例5: Post
import android.os.Parcel; //导入方法依赖的package包/类
protected Post(Parcel in){
title = in.readString();
updateTime = (DateTime) in.readSerializable();
tag = in.readString();
id = in.readString();
url = in.readString();
type = in.readString();
}
示例6: CalendarDay
import android.os.Parcel; //导入方法依赖的package包/类
protected CalendarDay(Parcel in) {
this.bottomLineColorId = -1;
this.bottomDrawableId = -1;
this.year = in.readInt();
this.month = in.readInt();
this.day = in.readInt();
this._calendar = (Calendar) in.readSerializable();
long tmp_date = in.readLong();
this._date = tmp_date == -1 ? null : new Date(tmp_date);
this.bottomLineColorId = in.readInt();
this.bottomDrawableId = in.readInt();
}
示例7: SavedState
import android.os.Parcel; //导入方法依赖的package包/类
/**
* Called from {@link #CREATOR} to create an instance of SavedState form the given parcel
* <var>source</var>.
*
* @param source Parcel with data for the new instance.
*/
protected SavedState(@NonNull Parcel source) {
super(source);
this.dateVisible = source.readLong();
this.dateSelected = (Long) source.readValue(Long.class.getClassLoader());
this.selectedDayMonthPosition = source.readInt();
this.locale = (Locale) source.readSerializable();
this.adapterState = source.readParcelable(UiConfig.class.getClassLoader());
}
示例8: SavedState
import android.os.Parcel; //导入方法依赖的package包/类
/**
* Called from {@link #CREATOR} to create an instance of SavedState form the given parcel
* <var>source</var>.
*
* @param source Parcel with data for the new instance.
*/
protected SavedState(@NonNull Parcel source) {
super(source);
this.selection = source.readInt();
this.selectionRange = source.readInt();
source.readIntArray(numbers = new int[source.readInt()]);
this.numberFormat = (NumberFormat) source.readSerializable();
}
示例9: UserNotification
import android.os.Parcel; //导入方法依赖的package包/类
protected UserNotification(Parcel in) {
id = in.readInt();
user_id = in.readInt();
invoker_id = in.readInt();
object_id = in.readInt();
object_type = in.readInt();
meta_data = in.readString();
meta_value = in.readSerializable();
created_at = in.readString();
user = in.readParcelable(UserSmall.class.getClassLoader());
comment = in.readParcelable(Comment.class.getClassLoader());
series = in.readParcelable(SeriesSmall.class.getClassLoader());
}
示例10: ActivityResult
import android.os.Parcel; //导入方法依赖的package包/类
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());
}
示例11: Apk
import android.os.Parcel; //导入方法依赖的package包/类
protected Apk(Parcel in) {
this.packageName = in.readString();
this.versionName = in.readString();
this.versionCode = in.readInt();
this.size = in.readInt();
this.repoId = in.readLong();
this.hash = in.readString();
this.hashType = in.readString();
this.minSdkVersion = in.readInt();
this.targetSdkVersion = in.readInt();
this.maxSdkVersion = in.readInt();
this.obbMainFile = in.readString();
this.obbMainFileSha256 = in.readString();
this.obbPatchFile = in.readString();
this.obbPatchFileSha256 = in.readString();
long tmpAdded = in.readLong();
this.added = tmpAdded == -1 ? null : new Date(tmpAdded);
this.requestedPermissions = in.createStringArray();
this.features = in.createStringArray();
this.nativecode = in.createStringArray();
this.sig = in.readString();
this.compatible = in.readByte() != 0;
this.apkName = in.readString();
this.installedFile = (SanitizedFile) in.readSerializable();
this.srcname = in.readString();
this.repoVersion = in.readInt();
this.repoAddress = in.readString();
this.incompatibleReasons = in.createStringArray();
this.antiFeatures = in.createStringArray();
this.appId = in.readLong();
}
示例12: Expense
import android.os.Parcel; //导入方法依赖的package包/类
private Expense(Parcel in) {
this.id = (Long) in.readValue(Long.class.getClassLoader());
this.vehicle = in.readParcelable(Vehicle.class.getClassLoader());
this.price = (BigDecimal) in.readSerializable();
long tmpDate = in.readLong();
this.date = tmpDate == -1 ? null : new Date(tmpDate);
this.info = in.readString();
}
示例13: BrewMethod
import android.os.Parcel; //导入方法依赖的package包/类
private BrewMethod(Parcel in) {
this.mMethodName = in.readString();
this.mMethodInstructions = (ArrayList<String>) in.readSerializable();
this.mMethodBrewPours = (ArrayList<Integer>) in.readSerializable();
this.mMethodDose = in.readInt();
this.mMethodServingSize = in.readInt();
this.mMethodBrewTime = (org.joda.time.Duration) in.readSerializable();
this.mMethodGrindSize = in.readString();
this.mHomeScreenTileId = in.readInt();
this.mDetailActivityGraphicId = in.readInt();
this.mDescription = in.readString();
}
示例14: FolderPickerConfig
import android.os.Parcel; //导入方法依赖的package包/类
protected FolderPickerConfig(Parcel in) {
this.showHiddenFiles = in.readByte() != 0;
this.showNonDirectoryFiles = in.readByte() != 0;
this.defaultDirectory = new File((java.io.File) in.readSerializable());
this.showCancelButton = in.readByte() != 0;
}
示例15: ErrorMessageSnapshot
import android.os.Parcel; //导入方法依赖的package包/类
ErrorMessageSnapshot(Parcel in) {
super(in);
this.sofarBytes = in.readLong();
this.throwable = (Throwable) in.readSerializable();
}