本文整理汇总了Java中android.os.Parcel.readBundle方法的典型用法代码示例。如果您正苦于以下问题:Java Parcel.readBundle方法的具体用法?Java Parcel.readBundle怎么用?Java Parcel.readBundle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.os.Parcel
的用法示例。
在下文中一共展示了Parcel.readBundle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readFromParcel
import android.os.Parcel; //导入方法依赖的package包/类
private void readFromParcel(Parcel source) {
what = source.readInt();
arg1 = source.readInt();
arg2 = source.readInt();
str = source.readString();
presenter = source.readString();
if (source.readInt() != 0) {
obj = source.readParcelable(getClass().getClassLoader());
}
if (source.readInt() != 0) {
objs = source.readParcelableArray(getClass().getClassLoader());
}
data = source.readBundle();
replyTo = Messenger.readMessengerOrNullFromParcel(source);
sendingUid = source.readInt();
}
示例2: FragmentState
import android.os.Parcel; //导入方法依赖的package包/类
public FragmentState(Parcel in) {
boolean z;
boolean z2 = true;
this.mClassName = in.readString();
this.mIndex = in.readInt();
this.mFromLayout = in.readInt() != 0;
this.mFragmentId = in.readInt();
this.mContainerId = in.readInt();
this.mTag = in.readString();
if (in.readInt() != 0) {
z = true;
} else {
z = false;
}
this.mRetainInstance = z;
if (in.readInt() == 0) {
z2 = false;
}
this.mDetached = z2;
this.mArguments = in.readBundle();
this.mSavedFragmentState = in.readBundle();
}
示例3: MediaDescriptionCompat
import android.os.Parcel; //导入方法依赖的package包/类
private MediaDescriptionCompat(Parcel in) {
this.mMediaId = in.readString();
this.mTitle = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
this.mSubtitle = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
this.mDescription = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
this.mIcon = (Bitmap) in.readParcelable(null);
this.mIconUri = (Uri) in.readParcelable(null);
this.mExtras = in.readBundle();
this.mMediaUri = (Uri) in.readParcelable(null);
}
示例4: VideoViewSaveState
import android.os.Parcel; //导入方法依赖的package包/类
public VideoViewSaveState(Parcel source) {
super(source);
// Android has two different classloaders: the framework classloader (which knows how to load Android classes)
// and the APK classloader (which knows how to load your code).
// The APK classloader has the framework classloader set as its parent, meaning it can also load Android classes.
mVideoViewStateBundle = source.readBundle(getClass().getClassLoader());
}
示例5: PermissionComponent
import android.os.Parcel; //导入方法依赖的package包/类
protected PermissionComponent(Parcel src) {
info = src.readParcelable(ActivityInfo.class.getClassLoader());
className = src.readString();
metaData = src.readBundle(Bundle.class.getClassLoader());
int N = src.readInt();
intents = new ArrayList<>(N);
while (N-- > 0) {
intents.add(new IntentInfo(src));
}
}
示例6: readFromParcel
import android.os.Parcel; //导入方法依赖的package包/类
public static Parcelable readFromParcel(Parcel parcel, Class<?> parcelableType, String key) {
parcel.setDataPosition(0);
Bundle bundle = parcel.readBundle();
bundle.setClassLoader(parcelableType.getClassLoader());
Parcelable unparceledInstance = bundle.getParcelable(key);
return unparceledInstance;
}
示例7: readSerializableMap
import android.os.Parcel; //导入方法依赖的package包/类
public static <T extends Serializable> Map<String, T> readSerializableMap(Parcel parcel) {
Map<String, T> map = new ArrayMap<>();
Bundle bundle = parcel.readBundle(Parcelables.class.getClassLoader());
for (String key : bundle.keySet()) {
@SuppressWarnings("unchecked")
T serializable = (T) bundle.getSerializable(key);
map.put(key, serializable);
}
return map;
}
示例8: RssFeed
import android.os.Parcel; //导入方法依赖的package包/类
public RssFeed(Parcel source) {
Bundle data = source.readBundle();
title = data.getString("title");
link = data.getString("link");
description = data.getString("description");
language = data.getString("language");
rssItems = data.getParcelableArrayList("rssItems");
}
示例9: PlaybackStateCompat
import android.os.Parcel; //导入方法依赖的package包/类
private PlaybackStateCompat(Parcel in) {
this.mState = in.readInt();
this.mPosition = in.readLong();
this.mSpeed = in.readFloat();
this.mUpdateTime = in.readLong();
this.mBufferedPosition = in.readLong();
this.mActions = in.readLong();
this.mErrorMessage = (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
this.mCustomActions = in.createTypedArrayList(CustomAction.CREATOR);
this.mActiveItemId = in.readLong();
this.mExtras = in.readBundle();
}
示例10: onTransact
import android.os.Parcel; //导入方法依赖的package包/类
@Override
protected boolean onTransact(int code, Parcel data, Parcel reply, int flags)
throws RemoteException {
if(code == ServiceContext.TRANSACT_BUNDLE_SENDER) {
Bundle bundle = data.readBundle();
Bundle result = onReceiver(bundle);
reply.writeBundle(result);
}
return true;
}
示例11: MagicKey
import android.os.Parcel; //导入方法依赖的package包/类
public MagicKey(final Parcel in) {
in.readStringList(mParamList);
for (int i = 0, n = in.readInt(); i < n; i++) {
mTypeList.add(in.readInt());
}
mBundle = in.readBundle(getClass().getClassLoader());
}
示例12: LogcatReaderLoader
import android.os.Parcel; //导入方法依赖的package包/类
private LogcatReaderLoader(Parcel in) {
this.recordingMode = in.readInt() == 1;
this.multiple = in.readInt() == 1;
Bundle bundle = in.readBundle();
for (String key : bundle.keySet()) {
lastLines.put(key, bundle.getString(key));
}
}
示例13: RouterRequest
import android.os.Parcel; //导入方法依赖的package包/类
protected RouterRequest(Parcel in) {
uri = in.readParcelable(Uri.class.getClassLoader());
bundle = in.readBundle();
requestCode = in.readInt();
optionsCompat = in.readBundle();
isIntercepted = in.readByte() != 0;
}
示例14: SavedState
import android.os.Parcel; //导入方法依赖的package包/类
SavedState(Parcel source) {
super(source);
isDialogShowing = source.readInt() == 1;
dialogBundle = source.readBundle();
}
示例15: SavedState
import android.os.Parcel; //导入方法依赖的package包/类
public SavedState(Parcel source) {
super(source);
dialogBundle = source.readBundle(getClass().getClassLoader());
}