本文整理了Java中android.os.Bundle.putAll()
方法的一些代码示例,展示了Bundle.putAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bundle.putAll()
方法的具体详情如下:
包路径:android.os.Bundle
类名称:Bundle
方法名:putAll
暂无
代码示例来源:origin: androidannotations/androidannotations
public I arg(Bundle map) {
args.putAll(map);
return (I) this;
}
代码示例来源:origin: facebook/facebook-android-sdk
@Override
public Builder readFrom(final CameraEffectTextures model) {
if (model != null) {
this.textures.putAll(model.textures);
}
return this;
}
代码示例来源:origin: facebook/facebook-android-sdk
@Override
public Builder readFrom(final CameraEffectArguments model) {
if (model != null) {
this.params.putAll(model.params);
}
return this;
}
代码示例来源:origin: ogaclejapan/SmartTabLayout
/**
* Inserts all mappings from the given Bundle into this Bundle.
*
* @param bundle a Bundle
*/
public Bundler putAll(Bundle bundle) {
this.bundle.putAll(bundle);
return this;
}
代码示例来源:origin: ogaclejapan/SmartTabLayout
/**
* Inserts all mappings from the given Bundle into this Bundle.
*
* @param bundle a Bundle
*/
public Bundler putAll(Bundle bundle) {
this.bundle.putAll(bundle);
return this;
}
代码示例来源:origin: bluelinelabs/Conductor
public BundleBuilder putAll(Bundle bundle) {
this.bundle.putAll(bundle);
return this;
}
代码示例来源:origin: f2prateek/dart
/**
* Inserts all mappings from the given Bundle into the underlying Bundle.
*
* @param bundle a Bundle
* @return this bundler instance to chain method calls
*/
public Bundler putAll(Bundle bundle) {
delegate.putAll(bundle);
return this;
}
代码示例来源:origin: firebase/firebase-jobdispatcher-android
Builder addExtras(Bundle bundle) {
if (bundle != null) {
extras.putAll(bundle);
}
return this;
}
代码示例来源:origin: facebook/facebook-android-sdk
/**
* @deprecated This method is deprecated. Use GraphRequest directly to set parameters.
*/
@Deprecated
public B setParameters(final Bundle parameters) {
params.putAll(parameters);
return (B) this;
}
代码示例来源:origin: Yalantis/uCrop
public UCrop withOptions(@NonNull Options options) {
mCropOptionsBundle.putAll(options.getOptionBundle());
return this;
}
代码示例来源:origin: facebook/facebook-android-sdk
@Override
public E readFrom(final P model) {
if (model != null) {
this.bundle.putAll(model.getBundle());
}
return (E)this;
}
}
代码示例来源:origin: facebook/facebook-android-sdk
@Override
public Bundle getParameters() {
Bundle parameters = new Bundle();
if (uploadContext.params != null) {
parameters.putAll(uploadContext.params);
}
parameters.putString(PARAM_UPLOAD_PHASE, PARAM_VALUE_UPLOAD_FINISH_PHASE);
parameters.putString(PARAM_SESSION_ID, uploadContext.sessionId);
Utility.putNonEmptyString(parameters, PARAM_TITLE, uploadContext.title);
Utility.putNonEmptyString(parameters, PARAM_DESCRIPTION, uploadContext.description);
Utility.putNonEmptyString(parameters, PARAM_REF, uploadContext.ref);
return parameters;
}
代码示例来源:origin: android-hacker/VirtualXposed
final Bundle optionsIn = new Bundle();
if (addAccountOptions != null) {
optionsIn.putAll(addAccountOptions);
代码示例来源:origin: facebook/facebook-android-sdk
/**
* Creates a new Request configured to upload a photo to the specified graph path.
*
* @param accessToken the access token to use, or null
* @param graphPath the graph path to use, defaults to me/photos
* @param image the bitmap image to upload
* @param caption the user generated caption for the photo, can be null
* @param params the parameters, can be null
* @param callback a callback that will be called when the request is completed to handle
* success or error conditions, can be null
* @return a Request that is ready to execute
*/
public static GraphRequest newUploadPhotoRequest(
AccessToken accessToken,
String graphPath,
Bitmap image,
String caption,
Bundle params,
Callback callback) {
graphPath = getDefaultPhotoPathIfNull(graphPath);
Bundle parameters = new Bundle();
if (params != null) {
parameters.putAll(params);
}
parameters.putParcelable(PICTURE_PARAM, image);
if (caption != null && !caption.isEmpty()) {
parameters.putString(CAPTION_PARAM, caption);
}
return new GraphRequest(accessToken, graphPath, parameters, HttpMethod.POST, callback);
}
代码示例来源:origin: robolectric/robolectric
@Override
protected void onSaveInstanceState(Bundle savedInstanceState) {
super.onSaveInstanceState(savedInstanceState);
savedInstanceState.putAll(state);
}
代码示例来源:origin: facebook/facebook-android-sdk
protected Bundle parseResponseUri(String urlString) {
Uri u = Uri.parse(urlString);
Bundle b = Utility.parseUrlQueryString(u.getQuery());
b.putAll(Utility.parseUrlQueryString(u.getFragment()));
return b;
}
代码示例来源:origin: facebook/facebook-android-sdk
Bundle parameters = new Bundle();
if (params != null) {
parameters.putAll(params);
代码示例来源:origin: pockethub/PocketHub
/**
* Confirm message and deliver callback to given activity
*
* @param activity
* @param requestCode
* @param title
* @param message
* @param bundle
*/
public static void show(final FragmentActivity activity,
final int requestCode, final String title, final String message,
final Bundle bundle) {
Bundle arguments = createArguments(title, message, requestCode);
if (bundle != null) {
arguments.putAll(bundle);
}
show(activity, new ConfirmDialogFragment(), arguments, TAG);
}
代码示例来源:origin: bluelinelabs/Conductor
@NonNull
static Controller newInstance(@NonNull Bundle bundle) {
final String className = bundle.getString(KEY_CLASS_NAME);
//noinspection ConstantConditions
Class cls = ClassUtils.classForName(className, false);
Constructor[] constructors = cls.getConstructors();
Constructor bundleConstructor = getBundleConstructor(constructors);
Bundle args = bundle.getBundle(KEY_ARGS);
if (args != null) {
args.setClassLoader(cls.getClassLoader());
}
Controller controller;
try {
if (bundleConstructor != null) {
controller = (Controller)bundleConstructor.newInstance(args);
} else {
//noinspection ConstantConditions
controller = (Controller)getDefaultConstructor(constructors).newInstance();
// Restore the args that existed before the last process death
if (args != null) {
controller.args.putAll(args);
}
}
} catch (Exception e) {
throw new RuntimeException("An exception occurred while creating a new instance of " + className + ". " + e.getMessage(), e);
}
controller.restoreInstanceState(bundle);
return controller;
}
代码示例来源:origin: firebase/firebase-jobdispatcher-android
@NonNull
Bundle encode(@NonNull JobParameters jobParameters, @NonNull Bundle data) {
if (data == null) {
throw new IllegalArgumentException("Unexpected null Bundle provided");
}
Bundle userExtras = jobParameters.getExtras();
if (userExtras != null) {
data.putAll(userExtras);
}
data.putInt(prefix + BundleProtocol.PACKED_PARAM_LIFETIME, jobParameters.getLifetime());
data.putBoolean(prefix + BundleProtocol.PACKED_PARAM_RECURRING, jobParameters.isRecurring());
data.putBoolean(
prefix + BundleProtocol.PACKED_PARAM_REPLACE_CURRENT, jobParameters.shouldReplaceCurrent());
data.putString(prefix + BundleProtocol.PACKED_PARAM_TAG, jobParameters.getTag());
data.putString(prefix + BundleProtocol.PACKED_PARAM_SERVICE, jobParameters.getService());
data.putInt(
prefix + BundleProtocol.PACKED_PARAM_CONSTRAINTS, compact(jobParameters.getConstraints()));
encodeTrigger(jobParameters.getTrigger(), data);
encodeRetryStrategy(jobParameters.getRetryStrategy(), data);
return data;
}
内容来源于网络,如有侵权,请联系作者删除!