當前位置: 首頁>>代碼示例>>Java>>正文


Java Parcel.readSerializable方法代碼示例

本文整理匯總了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();

    }
 
開發者ID:MiFirma,項目名稱:mi-firma-android,代碼行數:27,代碼來源:Initiative.java

示例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();
}
 
開發者ID:philipwhiuk,項目名稱:q-mail,代碼行數:14,代碼來源:Attachment.java

示例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];
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:13,代碼來源:Post.java

示例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;
}
 
開發者ID:mainh,項目名稱:MainCalendar,代碼行數:16,代碼來源:AlarmRecord.java

示例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();
}
 
開發者ID:thenewpotato,項目名稱:Blogg,代碼行數:9,代碼來源:Post.java

示例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();
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:13,代碼來源:CalendarDay.java

示例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());
}
 
開發者ID:universum-studios,項目名稱:android_ui,代碼行數:15,代碼來源:CalendarView.java

示例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();
}
 
開發者ID:universum-studios,項目名稱:android_ui,代碼行數:14,代碼來源:CircularNumberPicker.java

示例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());
}
 
開發者ID:wax911,項目名稱:anitrend-app,代碼行數:14,代碼來源:UserNotification.java

示例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());
}
 
開發者ID:prashantsaini1,項目名稱:android-titanium-imagecropper,代碼行數:14,代碼來源:CropImage.java

示例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();
}
 
開發者ID:uhuru-mobile,項目名稱:mobile-store,代碼行數:32,代碼來源:Apk.java

示例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();
}
 
開發者ID:piskula,項目名稱:FuelUp,代碼行數:9,代碼來源:Expense.java

示例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();
}
 
開發者ID:pattrickrice,項目名稱:Coffee-Brew-Guide,代碼行數:13,代碼來源:BrewMethod.java

示例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;
}
 
開發者ID:GlennioTech,項目名稱:MetadataEditor,代碼行數:7,代碼來源:FolderPickerConfig.java

示例15: ErrorMessageSnapshot

import android.os.Parcel; //導入方法依賴的package包/類
ErrorMessageSnapshot(Parcel in) {
    super(in);
    this.sofarBytes = in.readLong();
    this.throwable = (Throwable) in.readSerializable();
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:6,代碼來源:LargeMessageSnapshot.java


注:本文中的android.os.Parcel.readSerializable方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。