当前位置: 首页>>代码示例>>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;未经允许,请勿转载。