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.dahl.brendan.wordsearch.model.HighScore.java

public Bundle toBundle() {
    Bundle bundle = new Bundle();
    bundle.putLong(Constants.KEY_HIGH_SCORE_TIME, time);
    bundle.putInt(Constants.KEY_HIGH_SCORE_SIZE, size);
    bundle.putString(Constants.KEY_HIGH_SCORE_THEME, theme);
    bundle.putInt(Constants.KEY_WORD_COUNT, wordCount);
    bundle.putString(Constants.KEY_HIGH_SCORE_NAME, name);
    bundle.putInt(Constants.KEY_GLOBAL_RANK, globalRank);
    bundle.putBoolean(Constants.KEY_GLOBAL_HIGH_SCORE, globalHighScore);
    bundle.putInt(Constants.KEY_RANK, rank);
    bundle.putLong(Constants.KEY_HIGH_SCORE, getScore());
    return bundle;
}

From source file:com.hybris.mobile.app.commerce.fragment.CatalogMenuFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    outState.putString(SAVED_INSTANCE_CATEGORY, mCurrentCategoryId);
    mOpenByDefault = mCatalogMenuDrawerLayout.isDrawerOpen(mCatalogMenuDrawerLayout.getChildAt(1));
    outState.putBoolean(SAVED_INSTANCE_OPEN_BY_DEFAULT, mOpenByDefault);
    super.onSaveInstanceState(outState);
}

From source file:com.pax.pay.PaymentActivity.java

/**
 * terminal setting//from  ww  w .  j  a v a  2 s  .co m
 *
 * @param requestData
 */
private void doSetting(RequestData requestData) {
    ActionInputPassword inputPasswordAction = new ActionInputPassword(new ActionStartListener() {

        @Override
        public void onStart(AAction action) {
            ((ActionInputPassword) action).setParam(8, getString(R.string.prompt_sys_pwd), null);
            TransContext.getInstance().setCurrentAction(action);
        }
    });

    inputPasswordAction.setEndListener(new ActionEndListener() {

        @Override
        public void onEnd(AAction action, ActionResult result) {

            if (result.getRet() != TransResult.SUCC) {
                transFinish(result);
                return;
            }

            String data = EncUtils.SHA1((String) result.getData());
            if (!data.equals(SpManager.getSysParamSp().get(SysParamSp.SEC_SYSPWD))) {
                transFinish(new ActionResult(TransResult.ERR_PASSWORD, null));
                return;
            }

            Intent intent = new Intent(PaymentActivity.this, SettingsActivity.class);
            Bundle bundle = new Bundle();
            bundle.putString(EUIParamKeys.NAV_TITLE.toString(), getString(R.string.settings_title));
            bundle.putBoolean(EUIParamKeys.NAV_BACK.toString(), true);
            intent.putExtras(bundle);
            startActivityForResult(intent, REQUEST_CODE);
        }
    });

    inputPasswordAction.execute();
}

From source file:ch.berta.fabio.fabprogress.FabProgress.java

@Override
protected Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    bundle.putParcelable(STATE_SUPER, super.onSaveInstanceState());
    bundle.putBoolean(STATE_COMPLETE, mIsComplete);
    bundle.putInt(STATE_ANIM, mAnimState);

    return bundle;
}

From source file:com.aboveware.actionbar.support.FragmentLayoutSupport.java

@Override
public void showCustomAlertDialog(Bundle args) {
    args.putBoolean(CUSTOMIZED, true);
    dialogFragment = DetailsActivity.AlertDialogFragment.newInstance(args);
    dialogFragment.show(getFragmentmanager(), SHOW_ALERT_DIALOG);
}

From source file:com.facebook.android.friendsmash.HomeFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putBoolean(PENDING_POST_KEY, pendingPost);
}

From source file:fr.cph.chicago.activity.MainActivity.java

@Override
protected void onSaveInstanceState(Bundle outState) {
    outState.putBoolean("first", false);
    super.onSaveInstanceState(outState);
}

From source file:de.lebenshilfe_muenster.uk_gebaerden_muensterland.sign_trainer.AbstractSignTrainerFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    Log.d(AbstractSignTrainerFragment.TAG, "onSaveInstance " + hashCode());
    super.onSaveInstanceState(outState);
    if (null != this.answerViews) {
        Validate.notEmpty(this.answerViews, "AnswerViews should always contain at least one view!");
        final boolean answerVisible = View.VISIBLE == this.answerViews[0].getVisibility();
        outState.putBoolean(KEY_ANSWER_VISIBLE, answerVisible);
    } else {/*  ww  w . ja  v  a2  s  .  c  o m*/
        outState.putBoolean(KEY_ANSWER_VISIBLE, Boolean.FALSE);
    }
    if (null != this.currentSign) {
        outState.putParcelable(KEY_CURRENT_SIGN, this.currentSign);
    }
}

From source file:com.android.contacts.activities.PhotoSelectionActivity.java

@Override
protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putParcelable(KEY_CURRENT_PHOTO_URI, mCurrentPhotoUri);
    outState.putBoolean(KEY_SUB_ACTIVITY_IN_PROGRESS, mSubActivityInProgress);
}

From source file:com.brodev.socialapp.view.MusicPlaySong.java

/** Called when the activity is first created. */
@Override/*from w w  w .  j  a  v a 2 s .  c  o m*/
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.music_player);

    if (android.os.Build.VERSION.SDK_INT > 9) {
        StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
        StrictMode.setThreadPolicy(policy);
    }

    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    user = (User) getApplication().getApplicationContext();
    colorView = new ColorView(getApplicationContext());

    Bundle bundle = getIntent().getExtras();

    music = (Music) bundle.get("song");

    if (music.getTitle().equals("")) {
        this.getMusicAdapter();
    }
    initView();
    // get comment fragment
    Bundle comment = new Bundle();
    comment.putString("type", "music_song");
    comment.putInt("itemId", Integer.parseInt(music.getSong_id()));
    comment.putInt("totalComment", Integer.parseInt(music.getTotal_comment()));
    comment.putInt("total_like", Integer.parseInt(music.getTotal_like()));
    comment.putBoolean("no_share", music.isShare());
    comment.putBoolean("is_liked", music.isLiked());
    comment.putBoolean("can_post_comment", music.isCanPostComment());

    CommentFragment commentFragment = new CommentFragment();
    commentFragment.setArguments(comment);
    getSupportFragmentManager().beginTransaction().add(R.id.commentfragment_wrap, commentFragment).commit();

}