本文整理了Java中android.os.Bundle.putBoolean()
方法的一些代码示例,展示了Bundle.putBoolean()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bundle.putBoolean()
方法的具体详情如下:
包路径:android.os.Bundle
类名称:Bundle
方法名:putBoolean
暂无
代码示例来源:origin: pockethub/PocketHub
@Override
public Bundle hasFeatures(final AccountAuthenticatorResponse response,
final Account account, final String[] features)
throws NetworkErrorException {
final Bundle result = new Bundle();
result.putBoolean(KEY_BOOLEAN_RESULT, false);
return result;
}
代码示例来源: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: 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: 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: 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.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(KEY_MODE, buttonMode);
bundle.putSerializable(BootstrapBrand.KEY, bootstrapBrand);
bundle.putBoolean(RoundableView.KEY, rounded);
bundle.putBoolean(OutlineableView.KEY, outline);
return bundle;
}
代码示例来源:origin: bumptech/glide
public static FlickrPhotoGrid newInstance(int size, int preloadCount, boolean thumbnail) {
FlickrPhotoGrid photoGrid = new FlickrPhotoGrid();
Bundle args = new Bundle();
args.putInt(IMAGE_SIZE_KEY, size);
args.putInt(PRELOAD_KEY, preloadCount);
args.putBoolean(THUMBNAIL_KEY, thumbnail);
photoGrid.setArguments(args);
return photoGrid;
}
代码示例来源:origin: gabrielemariotti/RecyclerViewItemAnimators
/**
* Returns a Parcelable object containing the AnimationAdapter's current dynamic state.
*/
@NonNull
public Parcelable onSaveInstanceState() {
Bundle bundle = new Bundle();
bundle.putInt(SAVEDINSTANCESTATE_FIRSTANIMATEDPOSITION, mFirstAnimatedPosition);
bundle.putInt(SAVEDINSTANCESTATE_LASTANIMATEDPOSITION, mLastAnimatedPosition);
bundle.putBoolean(SAVEDINSTANCESTATE_SHOULDANIMATE, mShouldAnimate);
return bundle;
}
代码示例来源:origin: seven332/EhViewer
@Override
public Parcelable onSaveInstanceState() {
final Bundle state = new Bundle();
state.putParcelable(STATE_KEY_SUPER, super.onSaveInstanceState());
state.putBoolean(STATE_KEY_AUTO_CANCEL, mAutoCancel);
state.putBoolean(STATE_KEY_EXPANDED, mExpanded);
return state;
}
代码示例来源: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.putBoolean(RoundableView.KEY, roundedCorners);
return bundle;
}
代码示例来源:origin: naman14/Timber
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
Bundle extras = new Bundle();
extras.putBoolean("lockscreen",(boolean)newValue);
mPreferences.updateService(extras);
return true;
}
});
代码示例来源:origin: naman14/Timber
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
Bundle extras = new Bundle();
extras.putBoolean("xtrack",(boolean)newValue);
mPreferences.updateService(extras);
return true;
}
});
代码示例来源:origin: k9mail/k-9
public static MessageListFragment newInstance(
LocalSearch search, boolean isThreadDisplay, boolean threadedList) {
MessageListFragment fragment = new MessageListFragment();
Bundle args = new Bundle();
args.putParcelable(ARG_SEARCH, search);
args.putBoolean(ARG_IS_THREAD_DISPLAY, isThreadDisplay);
args.putBoolean(ARG_THREADED_LIST, threadedList);
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: bluelinelabs/Conductor
public void saveInstanceState(@NonNull Bundle outState) {
Bundle backstackState = new Bundle();
backstack.saveInstanceState(backstackState);
outState.putParcelable(KEY_BACKSTACK, backstackState);
outState.putBoolean(KEY_POPS_LAST_VIEW, popsLastView);
}
内容来源于网络,如有侵权,请联系作者删除!