當前位置: 首頁>>代碼示例>>Java>>正文


Java Bundle.putBoolean方法代碼示例

本文整理匯總了Java中android.os.Bundle.putBoolean方法的典型用法代碼示例。如果您正苦於以下問題:Java Bundle.putBoolean方法的具體用法?Java Bundle.putBoolean怎麽用?Java Bundle.putBoolean使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.os.Bundle的用法示例。


在下文中一共展示了Bundle.putBoolean方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setEditText

import android.os.Bundle; //導入方法依賴的package包/類
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);
    }
}
 
開發者ID:littleRich,項目名稱:AutoInteraction-Library,代碼行數:25,代碼來源:UiNode.java

示例2: getIntentAndInitFragment

import android.os.Bundle; //導入方法依賴的package包/類
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();
    }
 
開發者ID:Zyj163,項目名稱:yyox,代碼行數:20,代碼來源:ImageSelectorActivity.java

示例3: onSaveInstanceState

import android.os.Bundle; //導入方法依賴的package包/類
@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);
}
 
開發者ID:woshiwpa,項目名稱:SmartMath,代碼行數:16,代碼來源:ActivityCfgKeyPad.java

示例4: getItem

import android.os.Bundle; //導入方法依賴的package包/類
@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;
}
 
開發者ID:brevent,項目名稱:Brevent,代碼行數:14,代碼來源:BreventGuide.java

示例5: generateConditionBundle

import android.os.Bundle; //導入方法依賴的package包/類
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;
}
 
開發者ID:Dnet3,項目名稱:CustomAndroidOneSheeld,代碼行數:9,代碼來源:PluginBundleManager.java

示例6: onSaveInstanceState

import android.os.Bundle; //導入方法依賴的package包/類
@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;
}
 
開發者ID:lueans,項目名稱:LueansRead,代碼行數:15,代碼來源:TouchImageView.java

示例7: newInstance

import android.os.Bundle; //導入方法依賴的package包/類
/**
 * 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;
}
 
開發者ID:schul-cloud,項目名稱:schulcloud-mobile-android,代碼行數:18,代碼來源:HomeworkFragment.java

示例8: newInstance

import android.os.Bundle; //導入方法依賴的package包/類
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;
}
 
開發者ID:JustKiddingBaby,項目名稱:FragmentRigger,代碼行數:9,代碼來源:ContainerFragment.java

示例9: onSaveInstanceState

import android.os.Bundle; //導入方法依賴的package包/類
@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);
}
 
開發者ID:billthefarmer,項目名稱:diary,代碼行數:14,代碼來源:Diary.java

示例10: onSaveInstanceState

import android.os.Bundle; //導入方法依賴的package包/類
@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);
}
 
開發者ID:MobileDev418,項目名稱:chat-sdk-android-push-firebase,代碼行數:8,代碼來源:ChatSDKPickFriendsActivity.java

示例11: newInstance

import android.os.Bundle; //導入方法依賴的package包/類
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;
}
 
開發者ID:steevp,項目名稱:UpdogFarmer,代碼行數:9,代碼來源:HomeFragment.java

示例12: onResume

import android.os.Bundle; //導入方法依賴的package包/類
@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);
    }
}
 
開發者ID:emartech,項目名稱:android-mobile-engage-sdk,代碼行數:14,代碼來源:IamDialog.java

示例13: startEditProfileActivity

import android.os.Bundle; //導入方法依賴的package包/類
@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
}
 
開發者ID:pedromassango,項目名稱:Programmers,代碼行數:11,代碼來源:LoginActivity.java

示例14: onSaveInstanceState

import android.os.Bundle; //導入方法依賴的package包/類
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);
}
 
開發者ID:fengdongfei,項目名稱:CXJPadProject,代碼行數:11,代碼來源:SobotPostMsgActivity.java

示例15: onSaveInstanceState

import android.os.Bundle; //導入方法依賴的package包/類
@Override
protected void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putSerializable("calendar", myCalendar);
    outState.putBoolean("hasReminder", hasReminder);
}
 
開發者ID:JeanBarriere,項目名稱:Note,代碼行數:7,代碼來源:AddNoteActivity.java


注:本文中的android.os.Bundle.putBoolean方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。