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

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

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

Bundle.putBundle介绍

暂无

代码示例

代码示例来源:origin: androidannotations/androidannotations

public I arg(String key, Bundle value) {
  args.putBundle(key, value);
  return (I) this;
}

代码示例来源:origin: ogaclejapan/SmartTabLayout

/**
 * Inserts a Bundle value into the mapping of this Bundle, replacing
 * any existing value for the given key.  Either key or value may be null.
 *
 * @param key   a String, or null
 * @param value a Bundle object, or null
 */
public Bundler putBundle(String key, Bundle value) {
 bundle.putBundle(key, value);
 return this;
}

代码示例来源:origin: ogaclejapan/SmartTabLayout

/**
 * Inserts a Bundle value into the mapping of this Bundle, replacing
 * any existing value for the given key.  Either key or value may be null.
 *
 * @param key   a String, or null
 * @param value a Bundle object, or null
 */
public Bundler putBundle(String key, Bundle value) {
 bundle.putBundle(key, value);
 return this;
}

代码示例来源:origin: bluelinelabs/Conductor

public BundleBuilder putBundle(String key, Bundle value) {
  bundle.putBundle(key, value);
  return this;
}

代码示例来源:origin: f2prateek/dart

/**
 * Inserts a Bundle value into the mapping of the underlying Bundle, replacing any existing value
 * for the given key. Either key or value may be null.
 *
 * @param key a String, or null
 * @param value a Bundle object, or null
 * @return this bundler instance to chain method calls
 */
public Bundler put(String key, Bundle value) {
 delegate.putBundle(key, value);
 return this;
}

代码示例来源:origin: bluelinelabs/Conductor

@NonNull
final Bundle toBundle() {
  Bundle bundle = new Bundle();
  bundle.putString(KEY_CLASS_NAME, getClass().getName());
  Bundle savedState = new Bundle();
  saveToBundle(savedState);
  bundle.putBundle(KEY_SAVED_STATE, savedState);
  return bundle;
}

代码示例来源:origin: bluelinelabs/Conductor

@Override
public void saveToBundle(@NonNull Bundle bundle) {
  super.saveToBundle(bundle);
  bundle.putString(KEY_CHANGE_HANDLER_CLASS, changeHandler.getClass().getName());
  Bundle stateBundle = new Bundle();
  changeHandler.saveToBundle(stateBundle);
  bundle.putBundle(KEY_HANDLER_STATE, stateBundle);
}

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

@Override
protected void onSaveInstanceState(Bundle state) {
 super.onSaveInstanceState(state);
 Bundle adapterState=new Bundle();
 adapter.onSaveInstanceState(adapterState);
 state.putBundle(STATE_ADAPTER, adapterState);
}

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

@Override
protected void onSaveInstanceState(Bundle state) {
 super.onSaveInstanceState(state);
 Bundle adapterState=new Bundle();
 adapter.onSaveInstanceState(adapterState);
 state.putBundle(STATE_ADAPTER, adapterState);
}

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

@Override
protected void onSaveInstanceState(Bundle state) {
 super.onSaveInstanceState(state);
 Bundle adapterState=new Bundle();
 adapter.onSaveInstanceState(adapterState);
 state.putBundle(STATE_ADAPTER, adapterState);
}

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

@Override
protected void onSaveInstanceState(Bundle state) {
 super.onSaveInstanceState(state);
 Bundle adapterState=new Bundle();
 adapter.onSaveInstanceState(adapterState);
 state.putBundle(STATE_ADAPTER, adapterState);
}

代码示例来源:origin: konmik/nucleus

@Override
protected Parcelable onSaveInstanceState() {
  Bundle bundle = new Bundle();
  bundle.putBundle(PRESENTER_STATE_KEY, presenterDelegate.onSaveInstanceState());
  bundle.putParcelable(PARENT_STATE_KEY, super.onSaveInstanceState());
  return bundle;
}

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

private boolean onPlayRequest(Intent i, ControlRequestCallback cb) {
 Log.d(getClass().getSimpleName(), "play: "
   + i.getData().toString());
 MediaItemStatus.Builder statusBuilder=
   new MediaItemStatus.Builder(
                 MediaItemStatus.PLAYBACK_STATE_PLAYING);
 Bundle b=new Bundle();
 b.putString(MediaControlIntent.EXTRA_SESSION_ID, DemoRouteProvider.DEMO_SESSION_ID);
 b.putString(MediaControlIntent.EXTRA_ITEM_ID, DemoRouteProvider.DEMO_ITEM_ID);
 b.putBundle(MediaControlIntent.EXTRA_ITEM_STATUS,
       statusBuilder.build().asBundle());
 cb.onResult(b);
 return(true);
}

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

private boolean onPlayRequest(Intent i, ControlRequestCallback cb) {
 Log.d(getClass().getSimpleName(), "play: "
   + i.getData().toString());
 MediaItemStatus.Builder statusBuilder=
   new MediaItemStatus.Builder(
                 MediaItemStatus.PLAYBACK_STATE_PLAYING);
 Bundle b=new Bundle();
 b.putString(MediaControlIntent.EXTRA_SESSION_ID, DemoRouteProvider.DEMO_SESSION_ID);
 b.putString(MediaControlIntent.EXTRA_ITEM_ID, DemoRouteProvider.DEMO_ITEM_ID);
 b.putBundle(MediaControlIntent.EXTRA_ITEM_STATUS,
       statusBuilder.build().asBundle());
 cb.onResult(b);
 return(true);
}

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

private boolean onSeekRequest(Intent i, ControlRequestCallback cb) {
  Log.d(getClass().getSimpleName(), "seek");

  MediaItemStatus.Builder statusBuilder=
    new MediaItemStatus.Builder(
                  MediaItemStatus.PLAYBACK_STATE_PLAYING);

  Bundle b=new Bundle();

  b.putBundle(MediaControlIntent.EXTRA_ITEM_STATUS,
        statusBuilder.build().asBundle());

  cb.onResult(b);

  return(true);
 }
}

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

private boolean onSeekRequest(Intent i, ControlRequestCallback cb) {
  Log.d(getClass().getSimpleName(), "seek");

  MediaItemStatus.Builder statusBuilder=
    new MediaItemStatus.Builder(
                  MediaItemStatus.PLAYBACK_STATE_PLAYING);

  Bundle b=new Bundle();

  b.putBundle(MediaControlIntent.EXTRA_ITEM_STATUS,
        statusBuilder.build().asBundle());

  cb.onResult(b);

  return(true);
 }
}

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

private boolean onGetStatusRequest(Intent i,
                  ControlRequestCallback cb) {
 Log.d(getClass().getSimpleName(), "get-status");
 MediaItemStatus.Builder statusBuilder=
   new MediaItemStatus.Builder(
                 MediaItemStatus.PLAYBACK_STATE_PLAYING);
 Bundle b=new Bundle();
 b.putBundle(MediaControlIntent.EXTRA_ITEM_STATUS,
       statusBuilder.build().asBundle());
 cb.onResult(b);
 return(true);
}

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

private boolean onGetStatusRequest(Intent i,
                  ControlRequestCallback cb) {
 Log.d(getClass().getSimpleName(), "get-status");
 MediaItemStatus.Builder statusBuilder=
   new MediaItemStatus.Builder(
                 MediaItemStatus.PLAYBACK_STATE_PLAYING);
 Bundle b=new Bundle();
 b.putBundle(MediaControlIntent.EXTRA_ITEM_STATUS,
       statusBuilder.build().asBundle());
 cb.onResult(b);
 return(true);
}

代码示例来源:origin: facebook/facebook-android-sdk

/**
 * Adds the structure to the Intent to look like an app link and returns the Extras section
 * which is where the messenger parameters go.
 *
 * @param intent the intent to add to
 * @return the extras Bundle
 */
private Bundle setupIntentWithAppLinkExtrasBundle(Intent intent) {
 Bundle appLinksDataBundle = new Bundle();
 intent.putExtra("al_applink_data", appLinksDataBundle);
 Bundle extrasBundle = new Bundle();
 appLinksDataBundle.putBundle("extras", extrasBundle);
 return extrasBundle;
}

代码示例来源:origin: bluelinelabs/Conductor

@Override
public void onActivitySaveInstanceState(Activity activity, Bundle outState) {
  if (this.activity == activity) {
    prepareForHostDetachIfNeeded();
    for (Router router : getRouters()) {
      Bundle bundle = new Bundle();
      router.saveInstanceState(bundle);
      outState.putBundle(KEY_ROUTER_STATE_PREFIX + router.getContainerId(), bundle);
    }
  }
}

相关文章

Bundle类方法