List of usage examples for android.os Bundle putAll
public void putAll(Bundle bundle)
From source file:com.ibm.bluelist.LoginActivity.java
private Bundle getMergedOptions() { // Read activity metadata from AndroidManifest.xml ActivityInfo activityInfo = null;/* w ww.j av a 2s .c o m*/ try { activityInfo = getPackageManager().getActivityInfo(this.getComponentName(), PackageManager.GET_META_DATA); } catch (NameNotFoundException e) { Log.w(LOG_TAG, e.getMessage()); } Bundle mergedOptions = new Bundle(); if (activityInfo != null && activityInfo.metaData != null) { mergedOptions.putAll(activityInfo.metaData); } if (getIntent().getExtras() != null) { mergedOptions.putAll(getIntent().getExtras()); } return mergedOptions; }
From source file:org.xbmc.kore.ui.AbstractFragment.java
public void setDataHolder(AbstractInfoFragment.DataHolder dataHolder) { this.dataHolder = dataHolder; Bundle bundle = getArguments(); if (bundle == null) { setArguments(dataHolder.getBundle()); } else {// w w w.j a v a 2s . com bundle.putAll(dataHolder.getBundle()); } }
From source file:com.google.reviewit.AddReviewerFragment.java
private void addReviewer(Change change, final String reviewerId) { new AsyncTask<Change, Void, String>() { @Override/* www . j a v a 2 s .co m*/ protected String doInBackground(Change... changes) { Change change = changes[0]; try { change.addReviewer(reviewerId); return null; } catch (RestApiException e) { Log.w(TAG, "Adding reviewer failed", e); if (e instanceof HttpStatusException) { HttpStatusException se = (HttpStatusException) e; return getString(R.string.add_reviewer_error, se.getStatusCode(), se.getStatusText()); } else { return e.getMessage(); } } } protected void onPostExecute(String errorMsg) { if (errorMsg != null) { widgetUtil.showError(errorMsg); } else { widgetUtil.toast(R.string.reviewer_added); AddReviewerFragment fragment = new AddReviewerFragment(); Bundle bundle = new Bundle(); bundle.putAll(getArguments()); fragment.setArguments(bundle); display(fragment, false); } } }.execute(change); }
From source file:org.maikelwever.droidpile.ViewMessageActivity.java
@Override public void onSaveInstanceState(Bundle savedInstanceState) { super.onSaveInstanceState(savedInstanceState); if (this.mailpileMessage != null) { savedInstanceState.putAll(this.mailpileMessage.toBundle()); }//from w ww .j av a 2 s .c o m }
From source file:com.ameron32.apps.tapnotes._unused.original.LoginActivity.java
private Bundle getMergedOptions() { // Read activity metadata from AndroidManifest.xml ActivityInfo activityInfo = null;//from www . j a v a 2s .co m try { activityInfo = getPackageManager().getActivityInfo(this.getComponentName(), PackageManager.GET_META_DATA); } catch (NameNotFoundException e) { if (Parse.getLogLevel() <= Parse.LOG_LEVEL_ERROR && Log.isLoggable(LOG_TAG, Log.WARN)) { Log.w(LOG_TAG, e.getMessage()); } } // The options specified in the Intent (from ParseLoginBuilder) will // override any duplicate options specified in the activity metadata Bundle mergedOptions = new Bundle(); if (activityInfo != null && activityInfo.metaData != null) { mergedOptions.putAll(activityInfo.metaData); } if (getIntent().getExtras() != null) { mergedOptions.putAll(getIntent().getExtras()); } return mergedOptions; }
From source file:nu.yona.app.ui.pincode.PasscodeActivity.java
private Fragment getPasscodeFragment() { Bundle bPasscode = new Bundle(); if (getIntent().getExtras() != null && getIntent().getExtras().get(AppConstant.COLOR_CODE) != null) { bPasscode.putAll(getIntent().getExtras()); }//from ww w .j av a2 s .c o m bPasscode.putString(AppConstant.PASSCODE_SCREEN_NAME, AnalyticsConstant.PASSCODE_SCREEN); bPasscode.putInt(AppConstant.COLOR_CODE, colorCode); PasscodeFragment passcodeFragment = new PasscodeFragment(); passcodeFragment.setArguments(bPasscode); return passcodeFragment; }
From source file:net.reichholf.dreamdroid.activities.SimpleFragmentActivity.java
private void initViews(boolean initFragment) { setContentView(R.layout.simple_layout); if (initFragment) { FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); if (mFragment == null) { Fragment f = null;//from www. j a v a 2s .co m @SuppressWarnings("unchecked") Class<Fragment> c = (Class<Fragment>) getIntent().getExtras().get("fragmentClass"); Bundle args = new Bundle(); try { f = c.newInstance(); args.putAll(getIntent().getExtras()); f.setArguments(args); } catch (InstantiationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); } mFragment = f; } mCallBackHandler = null; ft.replace(R.id.content, mFragment, "fragment"); ft.commit(); } }
From source file:org.getlantern.firetweet.fragment.support.CursorStatusesFragment.java
protected void reloadStatuses() { final Bundle args = new Bundle(), fragmentArgs = getArguments(); if (fragmentArgs != null) { args.putAll(fragmentArgs); args.putBoolean(EXTRA_FROM_USER, true); }// w w w .jav a 2s .c o m getLoaderManager().restartLoader(0, args, this); }
From source file:nu.yona.app.ui.pincode.PasscodeActivity.java
private Fragment getPasscodeVerifyFragment() { Bundle bVerifyPasscode = new Bundle(); if (getIntent().getExtras() != null && getIntent().getExtras().get(AppConstant.COLOR_CODE) != null) { bVerifyPasscode.putAll(getIntent().getExtras()); }/*from w w w. java 2 s. co m*/ bVerifyPasscode.putInt(AppConstant.COLOR_CODE, colorCode); bVerifyPasscode.putString(AppConstant.PASSCODE_SCREEN_NAME, AnalyticsConstant.REENTER_PASSCODE_SCREEN); PasscodeFragment verifyPasscodeFragment = new PasscodeFragment(); verifyPasscodeFragment.setArguments(bVerifyPasscode); return verifyPasscodeFragment; }
From source file:com.parse.starter.ParseLoginActivity.java
/** * @see android.app.Activity#isDestroyed() *//*from w w w.j a va2 s . co m*/ // @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) // @Override // public boolean isDestroyed() { // if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) { // return super.isDestroyed(); // } // return destroyed; // } private Bundle getMergedOptions() { // Read activity metadata from AndroidManifest.xml ActivityInfo activityInfo = null; try { activityInfo = getPackageManager().getActivityInfo(this.getComponentName(), PackageManager.GET_META_DATA); } catch (NameNotFoundException e) { if (Parse.getLogLevel() <= Parse.LOG_LEVEL_ERROR && Log.isLoggable(LOG_TAG, Log.WARN)) { Log.w(LOG_TAG, e.getMessage()); } } // The options specified in the Intent (from ParseLoginBuilder) will // override any duplicate options specified in the activity metadata Bundle mergedOptions = new Bundle(); if (activityInfo != null && activityInfo.metaData != null) { mergedOptions.putAll(activityInfo.metaData); } if (getIntent().getExtras() != null) { mergedOptions.putAll(getIntent().getExtras()); } return mergedOptions; }