Java Code Examples for android.os.Bundle.putBoolean()

The following are Jave code examples for showing how to use putBoolean() of the android.os.Bundle class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: AutoInteraction-Library   File: UiNode.java   View Source Code Vote up 6 votes
public void setEditText(@NonNull Context context, @NonNull String text) throws MyException {
    if (null == context) {
        throw new NullPointerException("context");
    }
    if (null == text) {
        throw new NullPointerException("text");
    }
    try {
        //清空内容
        Bundle arguments = new Bundle();
        arguments.putInt(AccessibilityNodeInfo.ACTION_ARGUMENT_MOVEMENT_GRANULARITY_INT, AccessibilityNodeInfo
                .MOVEMENT_GRANULARITY_LINE);
        arguments.putBoolean(AccessibilityNodeInfo.ACTION_ARGUMENT_EXTEND_SELECTION_BOOLEAN, true);
        mAccessibilityNodeInfo.performAction(AccessibilityNodeInfo.ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY,
                arguments);
        //粘贴内容
        ClipData clipData = ClipData.newPlainText(context.getPackageName(), text);
        ClipboardManager clipboardManager = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
        clipboardManager.setPrimaryClip(clipData);
        mAccessibilityNodeInfo.performAction(AccessibilityNodeInfo.ACTION_PASTE);
    } catch (Exception e) {
        throw new MyException(e);
    }
}
 
Example 2
Project: yyox   File: ImageSelectorActivity.java   View Source Code Vote up 6 votes
private void getIntentAndInitFragment() {

        Intent intent = getIntent();
        mDefaultCount = intent.getIntExtra(EXTRA_SELECT_COUNT, 6);
        int mode = intent.getIntExtra(EXTRA_SELECT_MODE, MODE_MULTI);
        boolean isShow = intent.getBooleanExtra(EXTRA_SHOW_CAMERA, true);
        if (mode == MODE_MULTI && intent.hasExtra(EXTRA_DEFAULT_SELECTED_LIST)) {
            resultList = intent.getStringArrayListExtra(EXTRA_DEFAULT_SELECTED_LIST);
        }
        Bundle bundle = new Bundle();
        bundle.putInt(ImageSelectorFragment.EXTRA_SELECT_COUNT, mDefaultCount);
        bundle.putInt(ImageSelectorFragment.EXTRA_SELECT_MODE, mode);
        bundle.putBoolean(ImageSelectorFragment.EXTRA_SHOW_CAMERA, isShow);
        bundle.putStringArrayList(ImageSelectorFragment.EXTRA_DEFAULT_SELECTED_LIST, resultList);
        getSupportFragmentManager().beginTransaction()
                .add(R.id.kf5_image_framelayout, Fragment.instantiate(this, ImageSelectorFragment.class.getName(), bundle))
                .commit();
        initView();
    }
 
Example 3
Project: SmartMath   File: ActivityCfgKeyPad.java   View Source Code Vote up 5 votes
@Override
protected void onSaveInstanceState(Bundle bundle) {
	bundle.putInt("InputKeyRefClipboard.InputPadIdx", minputKeyRefClipboard.mnInputPadIdx);
	bundle.putBoolean("InputKeyRefClipboard.IsLand", minputKeyRefClipboard.mbIsLand);
	bundle.putInt("InputKeyRefClipboard.InputKeyIdx", minputKeyRefClipboard.mnInputKeyIdx);
	bundle.putString("ClipboardMode", mstrClipboardMode);
	bundle.putInt("SelectedInputPadIdx", mnSelectedInputPadIdx);
	bundle.putString("OriginallyLoadedInputPadsCfg", mstrOriginallyLoadedInputPadsCfg);
	bundle.putInt("DialogState", mnDialogState);
	bundle.putString("CannotSaveError", mstrCannotSaveError);
	bundle.putBoolean("CfgFileChanged", mbCfgFileChanged);
	String strXML = InputPadMgrEx.writeInputPadsToXML(mlistInputPads);
	bundle.putString("InputPads", strXML);
	// super.onSaveInstanceState(bundle);
}
 
Example 4
Project: Brevent   File: BreventGuide.java   View Source Code Vote up 5 votes
@Override
public Fragment getItem(int position) {
    GuideFragment fragment = new GuideFragment();
    Bundle arguments = fragment.getArguments();
    arguments.putString(GuideFragment.MESSAGE, mMessages[position]);
    arguments.putString(GuideFragment.MESSAGE2, mMessages2[position]);
    if (mTitles[position].equals(mTitleShowButton)) {
        arguments.putBoolean(GuideFragment.BUTTON, true);
    } else {
        arguments.putBoolean(GuideFragment.BUTTON, false);
    }
    return fragment;
}
 
Example 5
Project: CustomAndroidOneSheeld   File: PluginBundleManager.java   View Source Code Vote up 5 votes
public static Bundle generateConditionBundle(final Context context,
                                             final int pin, final boolean output) {
    Bundle result = new Bundle();
    result.putInt(CONDITION_BUNDLE_EXTRA_PIN_NUMBER, pin);
    result.putBoolean(CONDITION_BUNDLE_EXTRA_OUTPUT, output);

    return result;
}
 
Example 6
Project: LueansRead   File: TouchImageView.java   View Source Code Vote up 5 votes
@Override
public Parcelable onSaveInstanceState() {
    Bundle bundle = new Bundle();
    bundle.putParcelable("instanceState", super.onSaveInstanceState());
    bundle.putFloat("saveScale", normalizedScale);
    bundle.putFloat("matchViewHeight", matchViewHeight);
    bundle.putFloat("matchViewWidth", matchViewWidth);
    bundle.putInt("viewWidth", viewWidth);
    bundle.putInt("viewHeight", viewHeight);
    matrix.getValues(m);
    bundle.putFloatArray("matrix", m);
    bundle.putBoolean("imageRendered", imageRenderedAtLeastOnce);
    return bundle;
}
 
Example 7
Project: schulcloud-mobile-android   File: HomeworkFragment.java   View Source Code Vote up 5 votes
/**
 * Creates a new instance of this fragment.
 *
 * @param triggerDataSyncOnCreate Allows disabling the background sync service onCreate. Should
 *                                only be set to false during testing.
 * @return The new instance
 */
@NonNull
public static HomeworkFragment newInstance(boolean triggerDataSyncOnCreate) {
    HomeworkFragment homeworkFragment = new HomeworkFragment();

    Bundle args = new Bundle();
    args.putBoolean(ARGUMENT_TRIGGER_SYNC, triggerDataSyncOnCreate);
    homeworkFragment.setArguments(args);

    return homeworkFragment;
}
 
Example 8
Project: FragmentRigger   File: ContainerFragment.java   View Source Code Vote up 5 votes
public static ContainerFragment newInstance(int value, boolean customAnim) {
  Bundle args = new Bundle();
  args.putInt(BUNDLE_KEY, value);
  args.putBoolean(BUNDLE_KEY + 1, customAnim);
  ContainerFragment fragment = new ContainerFragment();
  fragment.setArguments(args);
  return fragment;
}
 
Example 9
Project: diary   File: Diary.java   View Source Code Vote up 5 votes
@Override
protected void onSaveInstanceState(Bundle outState)
{
    if (currEntry != null)
    {
        outState.putInt(YEAR, currEntry.get(Calendar.YEAR));
        outState.putInt(MONTH, currEntry.get(Calendar.MONTH));
        outState.putInt(DAY, currEntry.get(Calendar.DATE));

        outState.putBoolean(SHOWN, shown);
    }
    super.onSaveInstanceState(outState);
}
 
Example 10
Project: chat-sdk-android-push-firebase   File: ChatSDKPickFriendsActivity.java   View Source Code Vote up 5 votes
@Override
protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putLong(ChatSDKBaseThreadActivity.THREAD_ID, threadID);
    outState.putInt(MODE, mode);
    outState.putBoolean(ChatSDKAbstractChatActivity.ANIMATE_EXIT, animateExit);
}
 
Example 11
Project: UpdogFarmer   File: HomeFragment.java   View Source Code Vote up 5 votes
public static HomeFragment newInstance(boolean loggedIn, boolean farming) {
    final HomeFragment fragment = new HomeFragment();
    final Bundle args = new Bundle();
    args.putBoolean(LOGGED_IN, loggedIn);
    args.putBoolean(FARMING, farming);
    fragment.setArguments(args);
    return fragment;
}
 
Example 12
Project: android-mobile-engage-sdk   File: IamDialog.java   View Source Code Vote up 5 votes
@Override
public void onResume() {
    super.onResume();
    Bundle args = getArguments();
    boolean notShown = !args.getBoolean("isShown", false);

    if (action != null && notShown) {
        String campaignId = args.getString(CAMPAIGN_ID);
        long timestamp = System.currentTimeMillis();
        action.execute(campaignId, timestamp);
        args.putBoolean("isShown", true);
    }
}
 
Example 13
Project: Programmers   File: LoginActivity.java   View Source Code Vote up 5 votes
@Override
public void startEditProfileActivity(Usuario usuario) {

    Bundle bundle = new Bundle();
    bundle.putBoolean(Constants._FIRST_TIME, true);
    bundle.putParcelable(EXTRA_USER, usuario);

    IntentUtils.startActivity(this, bundle, EditProfileActivity.class);
    this.finish(); //Removing from list of activities
}
 
Example 14
Project: CXJPadProject   File: SobotPostMsgActivity.java   View Source Code Vote up 5 votes
protected void onSaveInstanceState(Bundle outState) {
	//被摧毁前缓存一些数据
	outState.putString("uid",uid);
	outState.putString("companyId",companyId);
	outState.putInt("flag_exit_type",flag_exit_type);
	outState.putBoolean("flag_exit_sdk",flag_exit_sdk);
	outState.putString("msgTmp",msgTmp);
	outState.putString("msgTxt",msgTxt);
	super.onSaveInstanceState(outState);
}
 
Example 15
Project: Note   File: AddNoteActivity.java   View Source Code Vote up 4 votes
@Override
protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putSerializable("calendar", myCalendar);
    outState.putBoolean("hasReminder", hasReminder);
}
 
Example 16
Project: metacom-android   File: MainFragment.java   View Source Code Vote up 4 votes
@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putBoolean(KEY_EXIT_DIALOG, mExitDialog);
    outState.putBoolean(KEY_PERMISSIONS_DIALOG, mPermissionsDialog);
}
 
Example 17
Project: GitHub   File: MyCustomViewState.java   View Source Code Vote up 4 votes
@Override public void saveInstanceState(Bundle out) {
  out.putBoolean(KEY_STATE, showingA);
  out.putParcelable(KEY_DATA, data);
}
 
Example 18
Project: X5web   File: FullScreenActivity.java   View Source Code Vote up 4 votes
private void enableX5FullscreenFunc() {

        if (webView.getX5WebViewExtension() != null) {
            Toast.makeText(this, "开启X5全屏播放模式", Toast.LENGTH_LONG).show();
            Bundle data = new Bundle();

            data.putBoolean("standardFullScreen", false);// true表示标准全屏,false表示X5全屏;不设置默认false,

            data.putBoolean("supportLiteWnd", false);// false:关闭小窗;true:开启小窗;不设置默认true,

            data.putInt("DefaultVideoScreen", 2);// 1:以页面内开始播放,2:以全屏开始播放;不设置默认:1

            webView.getX5WebViewExtension().invokeMiscMethod("setVideoParams",
                    data);
        }
    }
 
Example 19
Project: FragmentRigger   File: ContainerFragment.java   View Source Code Vote up 4 votes
@Override
public void onSaveInstanceState(Bundle outState) {
  super.onSaveInstanceState(outState);
  outState.putInt(BUNDLE_KEY, position);
  outState.putBoolean(BUNDLE_KEY + 1, customAnim);
}
 
Example 20
Project: CSipSimple   File: DialerFragment.java   View Source Code Vote up 4 votes
@Override
public void onSaveInstanceState(Bundle outState) {
    outState.putBoolean(TEXT_MODE_KEY, isDigit);
    super.onSaveInstanceState(outState);
}