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


Java Parcel.writeParcelable方法代碼示例

本文整理匯總了Java中android.os.Parcel.writeParcelable方法的典型用法代碼示例。如果您正苦於以下問題:Java Parcel.writeParcelable方法的具體用法?Java Parcel.writeParcelable怎麽用?Java Parcel.writeParcelable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.os.Parcel的用法示例。


在下文中一共展示了Parcel.writeParcelable方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this.mode);
    dest.writeInt(this.installFlags);
    dest.writeInt(this.installLocation);
    dest.writeLong(this.sizeBytes);
    dest.writeString(this.appPackageName);
    dest.writeParcelable(this.appIcon, flags);
    dest.writeString(this.appLabel);
    dest.writeLong(this.appIconLastModified);
    dest.writeParcelable(this.originatingUri, flags);
    dest.writeParcelable(this.referrerUri, flags);
    dest.writeString(this.abiOverride);
    dest.writeString(this.volumeUuid);
    dest.writeStringArray(this.grantedRuntimePermissions);
}
 
開發者ID:codehz,項目名稱:container,代碼行數:17,代碼來源:SessionParams.java

示例2: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@Override
public void writeToParcel(Parcel dest, int flags) {
	String[] toSend = new String[] {
			this.videoTitle,
			this.gameTitle,
			this.previewUrl,
			this.videoId,
			this.channelName,
			this.displayName,
			this.recordedAtString,
			String.valueOf(this.views),
			String.valueOf(this.length),
			String.valueOf(this.isBroadcast)
	};

	dest.writeStringArray(toSend);
	dest.writeParcelable(channelInfo, flags);
}
 
開發者ID:SebastianRask,項目名稱:Pocket-Plays-for-Twitch,代碼行數:19,代碼來源:VideoOnDemand.java

示例3: writeToEntropyPool

import android.os.Parcel; //導入方法依賴的package包/類
@Override
protected void writeToEntropyPool(DataOutputStream out) throws IOException {
	super.writeToEntropyPool(out);
	out.writeInt(android.os.Process.myPid());
	out.writeInt(android.os.Process.myTid());
	out.writeInt(android.os.Process.myUid());
	if (Build.FINGERPRINT != null) out.writeUTF(Build.FINGERPRINT);
	if (Build.SERIAL != null) out.writeUTF(Build.SERIAL);
	ContentResolver contentResolver = appContext.getContentResolver();
	String id = Settings.Secure.getString(contentResolver, ANDROID_ID);
	if (id != null) out.writeUTF(id);
	Parcel parcel = Parcel.obtain();
	WifiManager wm =
			(WifiManager) appContext.getSystemService(WIFI_SERVICE);
	List<WifiConfiguration> configs = wm.getConfiguredNetworks();
	if (configs != null) {
		for (WifiConfiguration config : configs)
			parcel.writeParcelable(config, 0);
	}
	BluetoothAdapter bt = BluetoothAdapter.getDefaultAdapter();
	if (bt != null) {
		for (BluetoothDevice device : bt.getBondedDevices())
			parcel.writeParcelable(device, 0);
	}
	out.write(parcel.marshall());
	parcel.recycle();
}
 
開發者ID:rafjordao,項目名稱:Nird2,代碼行數:28,代碼來源:AndroidSecureRandomProvider.java

示例4: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@Override public void writeToParcel(Parcel dest, int flags) {
    dest.writeLong(this.id);
    dest.writeParcelable(this.user, flags);
    dest.writeString(this.url);
    dest.writeString(this.body);
    dest.writeString(this.bodyHtml);
    dest.writeString(this.htmlUrl);
    dest.writeLong(this.createdAt != null ? this.createdAt.getTime() : -1);
    dest.writeLong(this.updatedAt != null ? this.updatedAt.getTime() : -1);
    dest.writeInt(this.position);
    dest.writeInt(this.line);
    dest.writeString(this.path);
    dest.writeString(this.commitId);
    dest.writeString(this.repoId);
    dest.writeString(this.login);
    dest.writeString(this.gistId);
    dest.writeString(this.issueId);
    dest.writeString(this.pullRequestId);
    dest.writeParcelable(this.reactions, flags);
}
 
開發者ID:duyp,項目名稱:mvvm-template,代碼行數:21,代碼來源:CommentEvent.java

示例5: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.mDisplayName);
    dest.writeByte(this.mStarred ? (byte) 1 : (byte) 0);
    dest.writeParcelable(this.mPhoto, flags);
    dest.writeParcelable(this.mThumbnail, flags);
    dest.writeStringList(this.mEmails);
    dest.writeStringList(this.mPhoneNumbers);
}
 
開發者ID:broakenmedia,項目名稱:MultiContactPicker,代碼行數:10,代碼來源:ContactResult.java

示例6: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.id);
    dest.writeString(this.name);
    dest.writeString(this.label);
    dest.writeParcelable(this.uploader, flags);
    dest.writeString(this.contentType);
    dest.writeString(this.state);
    dest.writeLong(this.size);
    dest.writeInt(this.downloadCout);
    dest.writeLong(this.createdAt != null ? this.createdAt.getTime() : -1);
    dest.writeLong(this.updatedAt != null ? this.updatedAt.getTime() : -1);
    dest.writeString(this.downloadUrl);
}
 
開發者ID:ThirtyDegreesRay,項目名稱:OpenHub,代碼行數:15,代碼來源:ReleaseAsset.java

示例7: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeParcelable(this.sysDTO, flags);
    dest.writeTypedList(this.weatherDTOs);
    dest.writeParcelable(this.mainDTO, flags);
    dest.writeParcelable(this.windDTO, flags);
    dest.writeString(this.id);
    dest.writeString(this.cityName);
    dest.writeString(this.lastUpdateTime);
    dest.writeTypedList(this.fiveDaysCityDTOs);
    dest.writeByte(this.isCurrentLocation ? (byte) 1 : (byte) 0);
    dest.writeInt(this.cursorIndex);
}
 
開發者ID:farukydnn,項目名稱:WeatherPlus,代碼行數:14,代碼來源:CityWeatherModelView.java

示例8: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeParcelable(this.originItem, flags);
    dest.writeParcelable(this.destinationItem, flags);
    dest.writeParcelable(this.originLatLng, flags);
    dest.writeParcelable(this.destinationLatLng, flags);
}
 
開發者ID:aliumujib,項目名稱:Nibo,代碼行數:8,代碼來源:NiboSelectedOriginDestination.java

示例9: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(type);
    dest.writeByte((byte) (isNull ? 1 : 0));

    if(!isNull){
        dest.writeParcelable(owner, flags);
    }
}
 
開發者ID:PhoenixDevTeam,項目名稱:Phoenix-for-VK,代碼行數:10,代碼來源:ParcelableOwnerWrapper.java

示例10: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@Override
public void writeToParcel(Parcel dest, int flags) {
	dest.writeInt(taskId);
	dest.writeParcelable(baseIntent, flags);
	dest.writeParcelable(baseActivity, flags);
	dest.writeParcelable(topActivity, flags);
}
 
開發者ID:7763sea,項目名稱:VirtualHook,代碼行數:8,代碼來源:AppTaskInfo.java

示例11: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@Override
public void writeToParcel(Parcel out, int flags) {
    super.writeToParcel(out, flags);
    out.writeInt(position);
    out.writeParcelable(adapterState, flags);
}
 
開發者ID:youngkaaa,項目名稱:YViewPagerDemo,代碼行數:7,代碼來源:YViewPager.java

示例12: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
public void writeToParcel(final Parcel out, final int flags) {
    super.writeToParcel(out, flags);
    out.writeParcelable(this.action, 0);
    out.writeString(this.previewPropertyName);
}
 
開發者ID:eviltnan,項目名稱:kognitivo,代碼行數:6,代碼來源:ShareOpenGraphContent.java

示例13: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@Override
public void writeToParcel(Parcel parcel, int i) {
    parcel.writeParcelable(status_distribution, i);
    parcel.writeSerializable(score_distribution_map);
    parcel.writeSerializable(favourite_genres_map);
}
 
開發者ID:wax911,項目名稱:anitrend-app,代碼行數:7,代碼來源:UserStats.java

示例14: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.url);
    dest.writeParcelable(this.mBounds, 0);
}
 
開發者ID:yangchaojiang,項目名稱:ZoomPreviewPicture,代碼行數:6,代碼來源:ThumbViewInfo.java

示例15: writeToParcel

import android.os.Parcel; //導入方法依賴的package包/類
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeByte(this.error ? (byte) 1 : (byte) 0);
    dest.writeParcelable(this.results, flags);
    dest.writeStringList(this.category);
}
 
開發者ID:fendoudebb,項目名稱:PlayAndroid,代碼行數:7,代碼來源:DailyData.java


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