List of usage examples for android.os Bundle putBoolean
public void putBoolean(@Nullable String key, boolean value)
From source file:com.sonetel.ui.dialpad.DialerFragment.java
@Override public void onSaveInstanceState(Bundle outState) { outState.putBoolean(TEXT_MODE_KEY, isDigit); super.onSaveInstanceState(outState); }
From source file:com.sonetel.ui.dialpad.DialerFragment.java
@Override public void placeVideoCall() { Bundle b = new Bundle(); b.putBoolean(SipCallSession.OPT_CALL_VIDEO, true); placeCallWithOption(b);/*from ww w . j a v a 2 s . c o m*/ }
From source file:com.example.alvarpao.popularmovies.MovieGridFragment.java
@Override public void onSaveInstanceState(Bundle savedInstanceState) { mSavedMovies.clear();/*from ww w .j a v a2s.c o m*/ for (int index = 0; index < mMovieAdapter.getCount(); index++) mSavedMovies.add(mMovieAdapter.getItem(index)); //Toast.makeText(getActivity(), "Number of movies saved: " + mSavedMovies.size(), // Toast.LENGTH_SHORT).show(); savedInstanceState.putParcelableArrayList(LOADED_MOVIES, mSavedMovies); savedInstanceState.putInt(PAGE_TO_FETCH, mPageToFetch); savedInstanceState.putInt(LOADED_PREVIOUS_ITEMS, mPreviousTotalItems); // The user actually selected a movie, it was not pre-selected by the app to keep the // details fragment from being empty in the two-pane layout if ((mSelectedMovie != -1) && (mSelectionOccurred)) savedInstanceState.putInt(SELECTED_MOVIE, mSelectedMovie); else { // No movie selected save the position of the first visible item //Toast.makeText(getActivity(), "No position selected, select first visible", // Toast.LENGTH_SHORT).show(); savedInstanceState.putInt(SELECTED_MOVIE, mMoviesGridView.getFirstVisiblePosition()); } savedInstanceState.putBoolean(SELECTION_OCCURRED, mSelectionOccurred); savedInstanceState.putInt(CURRENT_SCROLL_POSITION, mMoviesGridView.getFirstVisiblePosition()); super.onSaveInstanceState(savedInstanceState); }
From source file:com.dwdesign.tweetings.activity.ComposeActivity.java
@Override public void onBackPressed() { final String text = mEditText != null ? parseString(mEditText.getText()) : null; if (mContentModified && !isNullOrEmpty(text)) { mUnsavedTweetDialogFragment = (DialogFragment) Fragment.instantiate(this, UnsavedTweetDialogFragment.class.getName()); final Bundle args = new Bundle(); args.putBoolean(INTENT_KEY_IS_NAVIGATE_UP, false); mUnsavedTweetDialogFragment.setArguments(args); mUnsavedTweetDialogFragment.show(getSupportFragmentManager(), "unsaved_tweet"); return;//from w ww. j a v a 2 s. c o m } super.onBackPressed(); }
From source file:android.support.v17.leanback.app.BrowseFragment.java
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putInt(CURRENT_SELECTED_POSITION, mSelectedPosition); outState.putBoolean(IS_PAGE_ROW, mIsPageRow); if (mBackStackChangedListener != null) { mBackStackChangedListener.save(outState); } else {//from w w w. j a v a 2 s. co m outState.putBoolean(HEADER_SHOW, mShowingHeaders); } }
From source file:com.dwdesign.tweetings.activity.ComposeActivity.java
@Override public boolean onOptionsItemSelected(final MenuItem item) { switch (item.getItemId()) { case MENU_HOME: { final String text = mEditText != null ? parseString(mEditText.getText()) : null; if (mContentModified && !isNullOrEmpty(text)) { mUnsavedTweetDialogFragment = (DialogFragment) Fragment.instantiate(this, UnsavedTweetDialogFragment.class.getName()); final Bundle args = new Bundle(); args.putBoolean(INTENT_KEY_IS_NAVIGATE_UP, true); mUnsavedTweetDialogFragment.setArguments(args); mUnsavedTweetDialogFragment.show(getSupportFragmentManager(), "unsaved_tweet"); } else {/*from ww w . j a va 2s.com*/ NavUtils.navigateUpFromSameTask(this); } break; } case MENU_SEND: { send(); break; } case MENU_SELECT_ACCOUNT: { final Intent intent = new Intent(INTENT_ACTION_SELECT_ACCOUNT); final Bundle bundle = new Bundle(); bundle.putBoolean(INTENT_KEY_ACTIVATED_ONLY, true); bundle.putLongArray(INTENT_KEY_IDS, mAccountIds); intent.putExtras(bundle); startActivityForResult(intent, REQUEST_SELECT_ACCOUNT); break; } } return super.onOptionsItemSelected(item); }
From source file:co.taqat.call.LinphoneActivity.java
public void displayContacts(boolean chatOnly) { Bundle extras = new Bundle(); extras.putBoolean("ChatAddressOnly", chatOnly); changeCurrentFragment(FragmentsAvailable.CONTACTS_LIST, extras); }
From source file:com.mantz_it.rfanalyzer.MainActivity.java
@Override protected void onSaveInstanceState(Bundle outState) { outState.putBoolean(getString(R.string.save_state_running), running); outState.putInt(getString(R.string.save_state_demodulatorMode), demodulationMode); if (analyzerSurface != null) { outState.putLong(getString(R.string.save_state_channelFrequency), analyzerSurface.getChannelFrequency()); outState.putInt(getString(R.string.save_state_channelWidth), analyzerSurface.getChannelWidth()); outState.putFloat(getString(R.string.save_state_squelch), analyzerSurface.getSquelch()); outState.putLong(getString(R.string.save_state_virtualFrequency), analyzerSurface.getVirtualFrequency()); outState.putInt(getString(R.string.save_state_virtualSampleRate), analyzerSurface.getVirtualSampleRate()); outState.putFloat(getString(R.string.save_state_minDB), analyzerSurface.getMinDB()); outState.putFloat(getString(R.string.save_state_maxDB), analyzerSurface.getMaxDB()); }// w ww.ja v a 2s.c o m }
From source file:co.taqat.call.LinphoneActivity.java
public void displayContactsForEdition(String sipAddress) { Bundle extras = new Bundle(); extras.putBoolean("EditOnClick", true); extras.putString("SipAddress", sipAddress); changeCurrentFragment(FragmentsAvailable.CONTACTS_LIST, extras); }