本文整理了Java中android.os.Bundle.putParcelable()
方法的一些代码示例,展示了Bundle.putParcelable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bundle.putParcelable()
方法的具体详情如下:
包路径:android.os.Bundle
类名称:Bundle
方法名:putParcelable
暂无
代码示例来源:origin: androidannotations/androidannotations
@Override
public Parcelable onSaveInstanceState() {
Bundle bundle = new Bundle();
bundle.putString("stringState", stringState);
bundle.putParcelable("beanState", beanState);
return bundle;
}
代码示例来源:origin: google/cameraview
public static AspectRatioFragment newInstance(Set<AspectRatio> ratios,
AspectRatio currentRatio) {
final AspectRatioFragment fragment = new AspectRatioFragment();
final Bundle args = new Bundle();
args.putParcelableArray(ARG_ASPECT_RATIOS,
ratios.toArray(new AspectRatio[ratios.size()]));
args.putParcelable(ARG_CURRENT_ASPECT_RATIO, currentRatio);
fragment.setArguments(args);
return fragment;
}
代码示例来源:origin: stackoverflow.com
Bundle newExtras = new Bundle();
if (mCropValue.equals("circle")) {
newExtras.putString("circleCrop", "true");
}
if (mSaveUri != null) {
newExtras.putParcelable(MediaStore.EXTRA_OUTPUT, mSaveUri);
} else {
newExtras.putBoolean("return-data", true);
}
代码示例来源:origin: Yalantis/uCrop
private UCrop(@NonNull Uri source, @NonNull Uri destination) {
mCropIntent = new Intent();
mCropOptionsBundle = new Bundle();
mCropOptionsBundle.putParcelable(EXTRA_INPUT_URI, source);
mCropOptionsBundle.putParcelable(EXTRA_OUTPUT_URI, destination);
}
代码示例来源:origin: zhihu/Matisse
public void load(@Nullable Album target, boolean enableCapture) {
Bundle args = new Bundle();
args.putParcelable(ARGS_ALBUM, target);
args.putBoolean(ARGS_ENABLE_CAPTURE, enableCapture);
mLoaderManager.initLoader(LOADER_ID, args, this);
}
代码示例来源:origin: stackoverflow.com
CustomListing currentListing = new CustomListing();
Intent i = new Intent();
Bundle b = new Bundle();
b.putParcelable(Constants.CUSTOM_LISTING, currentListing);
i.putExtras(b);
i.setClass(this, SearchDetailsActivity.class);
startActivity(i);
代码示例来源:origin: pockethub/PocketHub
@Override
public Bundle updateCredentials(
final AccountAuthenticatorResponse response, final Account account,
final String authTokenType, final Bundle options) {
final Intent intent = new Intent(context, LoginActivity.class);
intent.putExtra(PARAM_AUTHTOKEN_TYPE, authTokenType);
intent.putExtra(KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
if (!TextUtils.isEmpty(account.name)) {
intent.putExtra(PARAM_USERNAME, account.name);
}
final Bundle bundle = new Bundle();
bundle.putParcelable(KEY_INTENT, intent);
return bundle;
}
}
代码示例来源:origin: ArthurHub/Android-Image-Cropper
/** Get {@link CropImageActivity} intent to start the activity. */
public Intent getIntent(@NonNull Context context, @Nullable Class<?> cls) {
mOptions.validate();
Intent intent = new Intent();
intent.setClass(context, cls);
Bundle bundle = new Bundle();
bundle.putParcelable(CROP_IMAGE_EXTRA_SOURCE, mSource);
bundle.putParcelable(CROP_IMAGE_EXTRA_OPTIONS, mOptions);
intent.putExtra(CropImage.CROP_IMAGE_EXTRA_BUNDLE, bundle);
return intent;
}
代码示例来源:origin: H07000223/FlycoTabLayout
@Override
protected Parcelable onSaveInstanceState() {
Bundle bundle = new Bundle();
bundle.putParcelable("instanceState", super.onSaveInstanceState());
bundle.putInt("mCurrentTab", mCurrentTab);
return bundle;
}
代码示例来源:origin: H07000223/FlycoTabLayout
@Override
protected Parcelable onSaveInstanceState() {
Bundle bundle = new Bundle();
bundle.putParcelable("instanceState", super.onSaveInstanceState());
bundle.putInt("mCurrentTab", mCurrentTab);
return bundle;
}
代码示例来源:origin: umano/AndroidSlidingUpPanel
@Override
public Parcelable onSaveInstanceState() {
Bundle bundle = new Bundle();
bundle.putParcelable("superState", super.onSaveInstanceState());
bundle.putSerializable(SLIDING_STATE, mSlideState != PanelState.DRAGGING ? mSlideState : mLastNotDraggingSlideState);
return bundle;
}
代码示例来源:origin: H07000223/FlycoTabLayout
@Override
protected Parcelable onSaveInstanceState() {
Bundle bundle = new Bundle();
bundle.putParcelable("instanceState", super.onSaveInstanceState());
bundle.putInt("mCurrentTab", mCurrentTab);
return bundle;
}
代码示例来源:origin: Bearded-Hen/Android-Bootstrap
@Override public Parcelable onSaveInstanceState() {
Bundle bundle = new Bundle();
bundle.putParcelable(TAG, super.onSaveInstanceState());
bundle.putBoolean(RoundableView.KEY, roundedCorners);
bundle.putBoolean(OutlineableView.KEY, showOutline);
bundle.putSerializable(KEY_DIRECTION, expandDirection);
bundle.putFloat(BootstrapSizeView.KEY, bootstrapSize);
return bundle;
}
代码示例来源:origin: Bearded-Hen/Android-Bootstrap
@Override public Parcelable onSaveInstanceState() {
Bundle bundle = new Bundle();
bundle.putParcelable(TAG, super.onSaveInstanceState());
bundle.putSerializable(BootstrapTextView.KEY, bootstrapText);
bundle.putSerializable(BootstrapBrand.KEY, bootstrapBrand);
return bundle;
}
代码示例来源:origin: Bearded-Hen/Android-Bootstrap
@Override public Parcelable onSaveInstanceState() {
Bundle bundle = new Bundle();
bundle.putParcelable(TAG, super.onSaveInstanceState());
bundle.putSerializable(BootstrapBrandView.KEY, bootstrapBrand);
bundle.putBoolean(BorderView.KEY_DISPLAYED, hasBorder);
bundle.putFloat(BootstrapSizeView.KEY, bootstrapSize);
return bundle;
}
代码示例来源:origin: Bearded-Hen/Android-Bootstrap
@Override public Parcelable onSaveInstanceState() {
Bundle bundle = new Bundle();
bundle.putParcelable(TAG, super.onSaveInstanceState());
bundle.putBoolean(RoundableView.KEY, rounded);
bundle.putFloat(BootstrapSizeView.KEY, bootstrapSize);
bundle.putSerializable(BootstrapBrand.KEY, bootstrapBrand);
return bundle;
}
代码示例来源:origin: Bearded-Hen/Android-Bootstrap
@Override public Parcelable onSaveInstanceState() {
Bundle bundle = new Bundle();
bundle.putParcelable(TAG, super.onSaveInstanceState());
bundle.putBoolean(RoundableView.KEY, roundable);
bundle.putSerializable(BootstrapHeading.KEY, bootstrapHeading);
return bundle;
}
代码示例来源:origin: Bearded-Hen/Android-Bootstrap
@Override public Parcelable onSaveInstanceState() {
Bundle bundle = new Bundle();
bundle.putParcelable(TAG, super.onSaveInstanceState());
bundle.putSerializable(KEY_MODE, buttonMode);
bundle.putSerializable(BootstrapBrand.KEY, bootstrapBrand);
bundle.putBoolean(RoundableView.KEY, rounded);
bundle.putBoolean(OutlineableView.KEY, outline);
return bundle;
}
代码示例来源:origin: Bearded-Hen/Android-Bootstrap
@Override public Parcelable onSaveInstanceState() {
Bundle bundle = new Bundle();
bundle.putParcelable(TAG, super.onSaveInstanceState());
bundle.putBoolean(RoundableView.KEY, roundedCorners);
return bundle;
}
代码示例来源:origin: Bearded-Hen/Android-Bootstrap
@Override
public Parcelable onSaveInstanceState() {
Bundle bundle = new Bundle();
bundle.putParcelable(TAG, super.onSaveInstanceState());
bundle.putInt(KEY_USER_PROGRESS, userProgress);
bundle.putInt(KEY_DRAWN_PROGRESS, drawnProgress);
bundle.putBoolean(KEY_STRIPED, striped);
bundle.putBoolean(KEY_ANIMATED, animated);
bundle.putBoolean(RoundableView.KEY, rounded);
bundle.putFloat(BootstrapSizeView.KEY, bootstrapSize);
bundle.putSerializable(BootstrapBrand.KEY, bootstrapBrand);
return bundle;
}
内容来源于网络,如有侵权,请联系作者删除!