Example usage for android.os Bundle putBoolean

List of usage examples for android.os Bundle putBoolean

Introduction

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

Prototype

public void putBoolean(@Nullable String key, boolean value) 

Source Link

Document

Inserts a Boolean value into the mapping of this Bundle, replacing any existing value for the given key.

Usage

From source file:com.abhijitvalluri.android.fitnotifications.AppChoicesActivity.java

@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
    savedInstanceState.putParcelableArrayList(STATE_APP_SELECTIONS, mAppSelections);
    savedInstanceState.putBoolean(STATE_SETUP_COMPLETE, mSetupComplete);
    Parcelable listState = mRecyclerView.getLayoutManager().onSaveInstanceState();
    savedInstanceState.putParcelable(STATE_RECYCLER_VIEW, listState);

    super.onSaveInstanceState(savedInstanceState);
}

From source file:at.bitfire.davdroid.syncadapter.LoginURLFragment.java

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
    case R.id.next:
        FragmentTransaction ft = getFragmentManager().beginTransaction();

        Bundle args = new Bundle();
        try {//  ww w.java 2  s . c  om
            args.putString(QueryServerDialogFragment.EXTRA_BASE_URI, getBaseURI().toString());
        } catch (URISyntaxException e) {
        }
        args.putString(QueryServerDialogFragment.EXTRA_USER_NAME, editUserName.getText().toString());
        args.putString(QueryServerDialogFragment.EXTRA_PASSWORD, editPassword.getText().toString());
        args.putBoolean(QueryServerDialogFragment.EXTRA_AUTH_PREEMPTIVE, checkboxPreemptive.isChecked());

        DialogFragment dialog = new QueryServerDialogFragment();
        dialog.setArguments(args);
        dialog.show(ft, QueryServerDialogFragment.class.getName());
        break;
    default:
        return false;
    }
    return true;
}

From source file:com.frostwire.android.gui.fragments.ImageViewerFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putBundle(EXTRA_FILE_DESCRIPTOR_BUNDLE, fd.toBundle());
    outState.putBoolean(EXTRA_IN_FULL_SCREEN_MODE, inFullScreenMode);
    outState.putInt(EXTRA_ADAPTER_FILE_OFFSET, position);
}

From source file:com.eutectoid.dosomething.SomethingFragment.java

@Override
public void onSaveInstanceState(Bundle bundle) {
    super.onSaveInstanceState(bundle);
    bundle.putBoolean(PENDING_ANNOUNCE_KEY, pendingAnnounce);
}

From source file:com.socialapp.eventmanager.LoginActivity.java

@Override
protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);

    outState.putBoolean(USER_SKIPPED_LOGIN_KEY, userSkippedLogin);
}

From source file:de.electricdynamite.pasty.ClipboardFragment.java

protected void restartLoading(Boolean permitCache) {
    Bundle args = new Bundle();
    args.putBoolean("permitCache", permitCache);
    restartLoading(args);//  ww w .  j  a  va2s  .  c om
    args = null;
}

From source file:com.fanfou.app.opensource.update.AppVersionInfo.java

@Override
public void writeToParcel(final Parcel dest, final int flags) {
    final Bundle bundle = new Bundle();
    bundle.putInt("versionCode", this.versionCode);
    bundle.putString("versionName", this.versionName);
    bundle.putString("releaseDate", this.releaseDate);
    bundle.putString("changelog", this.changelog);
    bundle.putString("downloadUrl", this.downloadUrl);
    bundle.putString("versionType", this.versionType);
    bundle.putString("packageName", this.packageName);
    bundle.putBoolean("forceUpdate", this.forceUpdate);
    dest.writeBundle(bundle);/*from   w  w  w  .  j  a va  2  s .  c  o m*/
}

From source file:com.amansoni.tripbook.activity.AddItemActivity.java

private void replaceListFragment(HorizontalListFragment fragment, int horizontalList, String itemType) {
    Bundle listArgs = new Bundle();
    if (!isImport && mTripbookItem != null)
        listArgs.putLong("itemId", mTripbookItem.getId());
    listArgs.putString("itemType", itemType);
    listArgs.putBoolean("editable", true);
    fragment.setArguments(listArgs);//from  www  .  j  a v  a 2s .  co m

    // update the main content by replacing fragments
    FragmentManager fragmentManager = this.getSupportFragmentManager();
    fragmentManager.beginTransaction().replace(horizontalList, fragment).commit();
}

From source file:com.abhijitvalluri.android.fitnotifications.AppSettingsActivity.java

@Override
protected void onSaveInstanceState(Bundle outState) {
    outState.putParcelable(STATE_APP_SELECTION, mAppSelection);
    outState.putInt(STATE_START_TIME_HOUR, mStartTimeHour);
    outState.putInt(STATE_START_TIME_MINUTE, mStartTimeMinute);
    outState.putInt(STATE_STOP_TIME_HOUR, mStopTimeHour);
    outState.putInt(STATE_STOP_TIME_MINUTE, mStopTimeMinute);
    outState.putBoolean(STATE_DISCARD_EMPTY_NOTIFICATIONS, mDiscardEmptyNotifications);
    outState.putBoolean(STATE_ALL_DAY_SCHEDULE, mAllDaySchedule);

    super.onSaveInstanceState(outState);
}

From source file:at.tomtasche.reader.ui.activity.DocumentActivity.java

public DocumentLoader loadUri(Uri uri, String password, boolean limit, boolean translatable) {
    Bundle bundle = new Bundle();
    bundle.putString(EXTRA_PASSWORD, password);
    bundle.putParcelable(EXTRA_URI, uri);
    bundle.putBoolean(EXTRA_LIMIT, limit);
    bundle.putBoolean(EXTRA_TRANSLATABLE, translatable);

    int lastIndex = uri.toString().lastIndexOf("/");
    String name = uri.toString().substring(lastIndex + 1);
    mFrDocument = new FrDocument(-1, name, uri.toString(), FrDocument.DOCTYPE_ODT, FrDocument.getDate());
    mFrDocument.updateDate(FrDocument.getDate());
    DatabaseHandler handler = new DatabaseHandler(this);
    long id = handler.hasFrDocument(mFrDocument);
    if (id == -1) {
        handler.addFrDocument(mFrDocument);
    } else {//from w ww . ja  va2 s .  co  m
        mFrDocument.updateId((int) id);
        handler.updateFrDocumentLastDate(mFrDocument);
    }
    return (DocumentLoader) getSupportLoaderManager().restartLoader(0, bundle, this);
}