本文整理汇总了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);
}
示例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);
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例14: writeToParcel
import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.url);
dest.writeParcelable(this.mBounds, 0);
}
示例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);
}