Example usage for android.os Bundle putAll

List of usage examples for android.os Bundle putAll

Introduction

In this page you can find the example usage for android.os Bundle putAll.

Prototype

public void putAll(Bundle bundle) 

Source Link

Document

Inserts all mappings from the given Bundle into this Bundle.

Usage

From source file:org.solovyev.android.messenger.FragmentUi.java

public void copyLastSavedInstanceState(@Nonnull Bundle outState) {
    if (lastSavedInstanceState != null) {
        outState.putAll(lastSavedInstanceState);
    }/*from   www.j av a  2  s.co  m*/
}

From source file:de.da_sense.moses.client.SurveyActivity.java

@Override
protected void onSaveInstanceState(Bundle outState) {
    Log.d(LOG_TAG, "onSaveInstanceState");
    outState.putAll(this.getIntent().getExtras());
    super.onSaveInstanceState(outState);
}

From source file:com.github.jobs.ui.dialog.SubscribeDialog.java

@Override
public void onClick(View v) {
    switch (v.getId()) {
    case R.id.btn_subscribe:
        String emailAddress = mEmail.getText().toString().trim();
        Matcher matcher = Patterns.EMAIL_ADDRESS.matcher(emailAddress);
        if (!matcher.find()) {
            mEmail.setError(getString(R.string.invalid_email_address));
            mEmail.requestFocus();/* w w  w.jav  a  2 s. c  o  m*/
            return;
        }

        Bundle extras = new Bundle();
        if (getIntent().getExtras() != null) {
            extras.putAll(getIntent().getExtras());
        }
        extras.putString(EmailSubscriberResolver.EXTRA_EMAIL, emailAddress);
        Groundy.queue(this, EmailSubscriberResolver.class, mEmailSubscriberReceiver.getReceiver(), extras);
        break;
    }
}

From source file:org.xbmc.kore.ui.PVRListFragment.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    ViewGroup root = (ViewGroup) inflater.inflate(R.layout.fragment_default_view_pager, container, false);
    ButterKnife.inject(this, root);

    Bundle tvArgs = new Bundle(), radioArgs = new Bundle();
    if (getArguments() != null) {
        tvArgs.putAll(getArguments());
        radioArgs.putAll(getArguments());
    }/*from w  w  w  .ja  v a 2  s .  c  o  m*/
    tvArgs.putInt(PVR_LIST_TYPE_KEY, LIST_TV_CHANNELS);
    radioArgs.putInt(PVR_LIST_TYPE_KEY, LIST_RADIO_CHANNELS);

    tabsAdapter = new TabsAdapter(getActivity(), getChildFragmentManager())
            .addTab(PVRChannelsListFragment.class, tvArgs, R.string.tv_channels, 1)
            .addTab(PVRChannelsListFragment.class, radioArgs, R.string.radio_channels, 2)
            .addTab(PVRRecordingsListFragment.class, getArguments(), R.string.recordings, 3);

    viewPager.setAdapter(tabsAdapter);
    pagerTabStrip.setViewPager(viewPager);

    return root;
}

From source file:com.planyourexchange.pageflow.PageFlowPagerAdapter.java

public void addBundleToFragment(int position, Bundle bundle) {
    Bundle mapBundle = bundleSparse.get(position);
    if (mapBundle != null) {
        mapBundle.putAll(bundle);
    } else {/*  w ww .  j a  va  2  s . c o  m*/
        bundleSparse.put(position, bundle);
    }
}

From source file:com.odoo.core.utils.OFragmentUtils.java

public void startFragment(Fragment fragment, boolean addToBackState, Bundle extra) {
    Bundle extra_data = fragment.getArguments();
    if (extra_data == null)
        extra_data = new Bundle();
    if (extra != null)
        extra_data.putAll(extra);
    fragment.setArguments(extra_data);// w  w  w .  j  a  v  a  2  s . c o  m
    loadFragment(fragment, addToBackState);
}

From source file:com.chess.genesis.activity.MsgBoxFrag.java

@Override
public void onSaveInstanceState(final Bundle savedInstanceState) {
    savedInstanceState.putAll(settings);
    super.onSaveInstanceState(savedInstanceState);
}

From source file:com.lamcreations.scaffold.common.activities.BaseActivity.java

protected Bundle getArguments() {
    Bundle args = new Bundle();
    Intent intent = getIntent();/* www.  jav a  2  s .  com*/
    if (intent.hasExtra(ScaffoldConstants.ARGS)) {
        args.putAll(intent.getBundleExtra(ScaffoldConstants.ARGS));
    }
    return args;
}

From source file:eu.inmite.apps.smsjizdenka.framework.activity.BaseSinglePaneActivity.java

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(getContentViewResourceId());

    if (getIntent().hasExtra(Intent.EXTRA_TITLE)) {
        setTitle(getIntent().getStringExtra(Intent.EXTRA_TITLE));
    }/*from   w ww. j  a  va  2s . com*/

    if (savedInstanceState == null) {
        Fragment fragment = onCreatePane();
        if (fragment != null) {
            Bundle b = fragment.getArguments();
            if (b == null) {
                b = new Bundle();
            }
            b.putAll(intentToFragmentArguments(getIntent()));
            fragment.setArguments(b);

            getSupportFragmentManager().beginTransaction().add(R.id.root_container, fragment, ROOT_FRAGMENT_TAG)
                    .commit();
        }
    }
}

From source file:nu.yona.app.ui.pincode.PinActivity.java

private void updatePin() {
    Intent intent = new Intent(this, PasscodeActivity.class);
    Bundle bundle = new Bundle();
    if (getIntent() != null && getIntent().getExtras() != null) {
        bundle.putAll(getIntent().getExtras());
    }//from w w  w .j  av  a2  s  . c  o  m
    bundle.putBoolean(AppConstant.FROM_SETTINGS, true);
    bundle.putString(AppConstant.SCREEN_TYPE, AppConstant.PIN_RESET_FIRST_STEP);
    bundle.putInt(AppConstant.TITLE_BACKGROUND_RESOURCE, R.drawable.triangle_shadow_mango);
    bundle.putInt(AppConstant.COLOR_CODE, ContextCompat.getColor(this, R.color.mango));
    bundle.putInt(AppConstant.PROGRESS_DRAWABLE, R.drawable.pin_reset_progress_bar);
    intent.putExtras(bundle);
    startActivity(intent);
}