List of usage examples for android.os Bundle clear
@Override public void clear()
From source file:com.amazon.cordova.plugin.ADMMessageHandler.java
static void cleanupNotificationIntent() { if (notificationIntent != null) { Bundle pushBundle = notificationIntent.getExtras().getBundle(PUSH_BUNDLE); if (pushBundle != null) { pushBundle.clear(); }/* w w w. j a v a 2 s. co m*/ } }
From source file:com.aqtx.app.main.activity.MainActivity.java
@Override protected void onSaveInstanceState(Bundle outState) { outState.clear(); }
From source file:com.mofinity.hkeasy.BasicMapActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); overridePendingTransition(R.anim.slide_in_left, R.anim.slide_out_left); setContentView(R.layout.basic_demo); setUpMapIfNeeded();//from w w w . ja v a 2 s . c o m Bundle bundle = getIntent().getExtras(); if (bundle != null) { searchType = bundle.getString("searchType"); String title = bundle.getString("title"); mapId = bundle.getInt("mapid", -1); setTitle(title); bundle.clear(); } else { } latlngbuilder = new LatLngBounds.Builder(); mMap.setOnMarkerClickListener(this); mMap.setOnInfoWindowClickListener(this); mMap.setOnMarkerDragListener(this); // added myLocatoin Enable button mMap.setMyLocationEnabled(true); updateMark(); Profile profile = Profile.loadProfile(this); if (mapId < 0) { mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(profile.lat, profile.lng), 13.0f)); } //startUpdates(null); //getLocation(null); }
From source file:com.appsimobile.appsii.AbstractSidebarPagerAdapter.java
@Override public void destroyItem(ViewGroup container, int position, Object object) { PageController controller = (PageController) object; HotspotPageEntry page = controller.getPage(); Bundle savedControllerState = mSavedControllerStates.get(page); if (savedControllerState == null) { savedControllerState = new Bundle(); mSavedControllerStates.put(page, savedControllerState); } else {//from ww w . j ava2 s.com savedControllerState.clear(); } controller.performPause(); controller.performSaveInstanceState(savedControllerState); controller.performStop(); controller.performOnDetach(); container.removeView(controller.getView()); controller.performDestroy(); if (mDontCachePages) { mActivePageControllers.remove(position); HotspotPageEntry e = controller.getPage(); mCachedControllers.remove(e); } }
From source file:de.spiritcroc.modular_remote.MainActivity.java
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if (discardSavedInstance) { outState.clear(); }//from ww w.j a va 2 s .co m }
From source file:com.google.android.apps.paco.ExperimentExecutorCustomRendering.java
private void save() { try {//from ww w . j a va 2s .c o m if (notificationHolderId == null) { // workaround the bug with re-launching and stale scheduleTime. // How - if there isn't a notificationHolder waiting, then this is not a response // to a notification. scheduledTime = 0L; } Event event = createEvent(experiment, scheduledTime); gatherResponses(event); experimentProviderUtil.insertEvent(event); deleteNotification(); Bundle extras = getIntent().getExtras(); if (extras != null) { extras.clear(); } updateAlarms(); notifySyncService(); showFeedback(); finish(); } catch (IllegalStateException ise) { new AlertDialog.Builder(this).setIcon(R.drawable.paco64).setTitle(R.string.required_answers_missing) .setMessage(ise.getMessage()).show(); } }
From source file:com.aslanoba.hwc.SettingsActivity.java
/** * Save the current value in ui control for restoring later. In most cases, the saved state is * not used. However, if the activity is collected by OS due to low memory, then the saved * state will be used in onCreate method with the Bundle parameter, so that any pending change * in UI will be kept and restored./*from ww w . j a v a 2 s . com*/ */ @Override protected void onSaveInstanceState(Bundle outState) { outState.clear(); //save pending settings in UI for (int i = 0; i < m_lstSettings.size(); i++) { SettingsListItem oItem = m_lstSettings.get(i); if (!oItem.m_oOrigValue.equals(oItem.m_oValue)) { if (oItem.m_oValue instanceof Integer) outState.putInt(String.valueOf(oItem.m_iPropId), (Integer) oItem.m_oValue); else if (oItem.m_oValue instanceof Boolean) outState.putBoolean(String.valueOf(oItem.m_iPropId), (Boolean) oItem.m_oValue); else outState.putString(String.valueOf(oItem.m_iPropId), oItem.m_oValue.toString()); } } }
From source file:com.facebook.android.GraphExplorer.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mHandler = new Handler(); setContentView(R.layout.graph_explorer); url = BASE_GRAPH_URL; // Base URL mInputId = (EditText) findViewById(R.id.inputId); mOutput = (TextView) findViewById(R.id.output); mSubmitButton = (Button) findViewById(R.id.submitButton); mViewURLButton = (Button) findViewById(R.id.viewURLButton); mGetPermissionsButton = (Button) findViewById(R.id.accessTokenButton); mFieldsConnectionsButton = (Button) findViewById(R.id.fieldsAndConnectionsButton); mBackParentButton = (Button) findViewById(R.id.backParentButton); mScrollView = (ScrollView) findViewById(R.id.ScrollView01); mTextDeleteButton = (Button) findViewById(R.id.textDeleteButton); mMeButton = (Button) findViewById(R.id.meButton); if (Utility.mFacebook.isSessionValid()) { mMeButton.setVisibility(View.VISIBLE); }//from ww w.ja v a 2s . c o m params = new Bundle(); mSubmitButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { ((InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE)) .hideSoftInputFromWindow(mInputId.getWindowToken(), 0); // Prepare the URL to be shown on 'View URL' click action. This // is not used by the SDK url = BASE_GRAPH_URL; // Base URL /* * Source Tag: graph_explorer */ rootString = mInputId.getText().toString(); if (!TextUtils.isEmpty(rootString)) { dialog = ProgressDialog.show(GraphExplorer.this, "", getString(R.string.please_wait), true, true); params.putString("metadata", "1"); Utility.mAsyncRunner.request(rootString, params, new graphApiRequestListener()); url += "/" + rootString; // Relative Path provided by you } } }); mViewURLButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { setText(url); Linkify.addLinks(mOutput, Linkify.WEB_URLS); } }); mGetPermissionsButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if (Utility.mFacebook.isSessionValid()) { dialog = ProgressDialog.show(GraphExplorer.this, "", getString(R.string.fetching_current_permissions), true, true); Bundle params = new Bundle(); params.putString("access_token", Utility.mFacebook.getAccessToken()); Utility.mAsyncRunner.request("me/permissions", params, new permissionsRequestListener()); } else { new PermissionsDialog(GraphExplorer.this).show(); } } }); mFieldsConnectionsButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if (metadataObject == null) { makeToast("No fields, connections availalbe for this object."); } else { new FieldsConnectionsDialog(GraphExplorer.this, metadataObject).show(); } } }); mTextDeleteButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { url = BASE_GRAPH_URL; // Base URL mParentObjectId = ""; mInputId.setText(""); params.clear(); metadataObject = null; setText(""); mBackParentButton.setVisibility(View.INVISIBLE); } }); mMeButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { mInputId.setText("me"); mSubmitButton.performClick(); } }); mBackParentButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { mInputId.setText(mParentObjectId); mParentObjectId = ""; mSubmitButton.performClick(); } }); }
From source file:au.org.intersect.faims.android.ui.activity.ShowModuleActivity.java
@Override protected void onSaveInstanceState(Bundle outState) { outState.clear(); saveTo(outState);//from w w w . ja va 2 s . c o m super.onSaveInstanceState(outState); }
From source file:au.org.intersect.faims.android.ui.activity.ShowModuleActivity.java
@Override protected void onRestoreInstanceState(Bundle savedInstanceState) { restoreFrom(savedInstanceState);/*from ww w .j ava 2s.c om*/ super.onRestoreInstanceState(savedInstanceState); savedInstanceState.clear(); }