android.os.Bundle.putSerializable()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(194)

本文整理了Java中android.os.Bundle.putSerializable()方法的一些代码示例,展示了Bundle.putSerializable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bundle.putSerializable()方法的具体详情如下:
包路径:android.os.Bundle
类名称:Bundle
方法名:putSerializable

Bundle.putSerializable介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

Bundle args = new Bundle();
args.putSerializable("arg", YourEnumType.ENUM_KEY_1);

代码示例来源:origin: stackoverflow.com

Bundle extras = new Bundle();
extras.putSerializable("HashMap",Hash_Map);
intent.putExtras(extras);

代码示例来源:origin: stackoverflow.com

Bundle bundle = new Bundle();
bundle.putSerializable("value", all_thumbs);
intent.putExtras(bundle);

代码示例来源:origin: AltBeacon/android-beacon-library

public Bundle toBundle() {
  Bundle bundle = new Bundle();
  bundle.putSerializable(SETTINGS_DATA_KEY, this);
  return bundle;
}
public static SettingsData fromBundle(@NonNull Bundle 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: AltBeacon/android-beacon-library

public Bundle toBundle() {
  Bundle bundle = new Bundle();
  bundle.putSerializable(REGION_KEY, mRegion);
  ArrayList<Serializable> serializableBeacons = new ArrayList<Serializable>();
  for (Beacon beacon : mBeacons) {
    serializableBeacons.add(beacon);
  }
  bundle.putSerializable(BEACONS_KEY, serializableBeacons);
  return bundle;
}
public static RangingData fromBundle(Bundle bundle) {

代码示例来源:origin: AltBeacon/android-beacon-library

public Bundle toBundle() {
  Bundle bundle = new Bundle();
  bundle.putSerializable(REGION_KEY, mRegion);
  bundle.putBoolean(INSIDE_KEY, mInside);
  return bundle;
}
public static MonitoringData fromBundle(Bundle 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: 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: 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: AltBeacon/android-beacon-library

public Bundle toBundle() {
  Bundle bundle = new Bundle();
  bundle.putLong(SCAN_PERIOD_KEY, this.mScanPeriod);
  bundle.putLong(BETWEEN_SCAN_PERIOD_KEY, this.mBetweenScanPeriod);
  bundle.putBoolean(BACKGROUND_FLAG_KEY, this.mBackgroundFlag);
  bundle.putString(CALLBACK_PACKAGE_NAME_KEY, this.mCallbackPackageName);
  if (mRegion != null) {
    bundle.putSerializable(REGION_KEY, mRegion);
  }
  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.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;
}

代码示例来源:origin: smuyyh/BookReader

public static Fragment newInstance(int position, Book book, String epubFileName, boolean isSmilAvailable) {
  EPubReaderFragment fragment = new EPubReaderFragment();
  Bundle args = new Bundle();
  args.putInt(BUNDLE_POSITION, position);
  args.putSerializable(BUNDLE_BOOK, book);
  args.putString(BUNDLE_EPUB_FILE_NAME, epubFileName);
  args.putSerializable(BUNDLE_IS_SMIL_AVAILABLE, isSmilAvailable);
  fragment.setArguments(args);
  return fragment;
}

代码示例来源:origin: florent37/CameraFragment

protected static Fragment newInstance(Fragment fragment, Configuration configuration) {
  Bundle args = new Bundle();
  args.putSerializable(ARG_CONFIGURATION, configuration);
  fragment.setArguments(args);
  return fragment;
}

代码示例来源:origin: wangdan/AisenWeiBo

public static PictureDireListFragment newInstance(String currentDire, ArrayList<PictureFileDire> files) {
  Bundle args = new Bundle();
  args.putSerializable("files", files);
  args.putSerializable("current", currentDire);
  PictureDireListFragment fragment = new PictureDireListFragment();
  fragment.setArguments(args);
  return fragment;
}

代码示例来源: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.putInt(KEY_INDEX, parentIndex);
  bundle.putFloat(BootstrapSizeView.KEY, bootstrapSize);
  bundle.putSerializable(KEY_MODE, buttonMode);
  if (bootstrapBadge != null) {
    bundle.putString(BadgeContainerView.KEY, bootstrapBadge
        .getBadgeText());
  }
  return bundle;
}

代码示例来源:origin: commonsguy/cw-omnibus

static EditorFragment newInstance(File fileToEdit) {
 EditorFragment frag=new EditorFragment();
 Bundle args=new Bundle();
 args.putSerializable(KEY_FILE, fileToEdit);
 frag.setArguments(args);
 return(frag);
}

相关文章

Bundle类方法