当前位置: 首页>>代码示例>>Java>>正文


Java Bundle.getBoolean方法代码示例

本文整理汇总了Java中android.os.Bundle.getBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java Bundle.getBoolean方法的具体用法?Java Bundle.getBoolean怎么用?Java Bundle.getBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.os.Bundle的用法示例。


在下文中一共展示了Bundle.getBoolean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState)
{
    setKeepInstance(true);
    setThemeDark(ThemeUtil.isDarkTheme(getActivity()));

    super.onCreate(savedInstanceState);

    if (null != savedInstanceState) {
        mPath = (File) savedInstanceState.getSerializable(KEY_PATH);
        mTypeMask = savedInstanceState.getInt(KEY_MASK);
        mCanSelectMulti = savedInstanceState.getBoolean(KEY_CAN_SEL_MULTI);
        mCanWrite = savedInstanceState.getBoolean(KEY_WRITABLE);
        mSavedPathList = savedInstanceState.getStringArrayList(KEY_SELECTED_ITEMS);
    }

    mAdapter = new LocalResourceListAdapter();
    mAdapter.setSingleSelectable(!mCanSelectMulti);
    mAdapter.setOnChangePathListener(this);
    mAdapter.addOnSelectionChangedListener(this);

    runLoader();
}
 
开发者ID:nextgis,项目名称:android_nextgis_mobile,代码行数:24,代码来源:LocalResourceSelectDialog.java

示例2: onViewCreated

import android.os.Bundle; //导入方法依赖的package包/类
@SuppressWarnings("ConstantConditions") @Override public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    Bundle bundle = getArguments();
    title.setText(bundle.getString("bundleTitle"));
    String msg = bundle.getString("bundleMsg");
    if (bundle.getBoolean("isMarkDown")) {
        if (msg != null) {
            message.setVisibility(View.GONE);
            prettifyWebView.setVisibility(View.VISIBLE);
            prettifyWebView.setGithubContent(msg, null, false, false);
            prettifyWebView.setNestedScrollingEnabled(false);
        }
    } else {
        message.setText(msg);
    }
    if (bundle != null) {
        boolean hideCancel = bundle.getBoolean("hideCancel");
        if (hideCancel) cancel.setVisibility(View.GONE);
        initButton(bundle);
    }
}
 
开发者ID:duyp,项目名称:mvvm-template,代码行数:22,代码来源:MessageDialogView.java

示例3: onRestoreInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
@Override
protected final void onRestoreInstanceState(Parcelable state) {
	if (state instanceof Bundle) {
		Bundle bundle = (Bundle) state;

		setMode(Mode.mapIntToValue(bundle.getInt(STATE_MODE, 0)));
		mCurrentMode = Mode.mapIntToValue(bundle.getInt(STATE_CURRENT_MODE, 0));

		mScrollingWhileRefreshingEnabled = bundle.getBoolean(STATE_SCROLLING_REFRESHING_ENABLED, false);
		mShowViewWhileRefreshing = bundle.getBoolean(STATE_SHOW_REFRESHING_VIEW, true);

		// Let super Restore Itself
		super.onRestoreInstanceState(bundle.getParcelable(STATE_SUPER));

		State viewState = State.mapIntToValue(bundle.getInt(STATE_STATE, 0));
		if (viewState == State.REFRESHING || viewState == State.MANUAL_REFRESHING) {
			setState(viewState, true);
		}

		// Now let derivative classes restore their state
		onPtrRestoreInstanceState(bundle);
		return;
	}

	super.onRestoreInstanceState(state);
}
 
开发者ID:ccfish86,项目名称:sctalk,代码行数:27,代码来源:PullToRefreshBase.java

示例4: onPropertiesChanged

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onPropertiesChanged(Bundle properties) {
    super.onPropertiesChanged(properties);

    mLowBitAmbient = properties.getBoolean(PROPERTY_LOW_BIT_AMBIENT, false);
    mBurnInProtection = properties.getBoolean(PROPERTY_BURN_IN_PROTECTION, false);

    //Updates complications to properly render in Ambient Mode based on device
    for (int COMPLICATION_ID : COMPLICATION_IDS) {
        final ComplicationDrawable complicationDrawable
                = mComplicationDrawableSparseArray.get(COMPLICATION_ID);

        if (complicationDrawable != null) {
            complicationDrawable.setLowBitAmbient(mLowBitAmbient);
            complicationDrawable.setBurnInProtection(mBurnInProtection);
        }
    }
}
 
开发者ID:Nxt3,项目名称:IO_Classic_WatchFace,代码行数:19,代码来源:IOClassicWatchFaceService.java

示例5: c

import android.os.Bundle; //导入方法依赖的package包/类
public c(Bundle bundle) {
    super(bundle);
    this.a = bundle.getString("ext_msg_type");
    this.e = bundle.getString("ext_msg_lang");
    this.d = bundle.getString("ext_msg_thread");
    this.f = bundle.getString("ext_msg_sub");
    this.g = bundle.getString("ext_msg_body");
    this.h = bundle.getString("ext_body_encode");
    this.j = bundle.getString("ext_msg_appid");
    this.i = bundle.getBoolean("ext_msg_trans", false);
    this.o = bundle.getBoolean("ext_msg_encrypt", false);
    this.k = bundle.getString("ext_msg_seq");
    this.l = bundle.getString("ext_msg_mseq");
    this.m = bundle.getString("ext_msg_fseq");
    this.n = bundle.getString("ext_msg_status");
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:17,代码来源:c.java

示例6: onCreate

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);

    // enable Cordova apps to be started in the background
    Bundle extras = getIntent().getExtras();
    if (extras != null && extras.getBoolean("cdvStartInBackground", false)) {
        moveTaskToBack(true);
    }

    // Set by <content src="index.html" /> in config.xml
    loadUrl(launchUrl);
}
 
开发者ID:disit,项目名称:siiMobilityAppKit,代码行数:15,代码来源:MainActivity.java

示例7: restoreSavedInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
private void restoreSavedInstanceState(@Nullable Bundle savedInstanceState) {
  if (savedInstanceState == null) {
    return;
  }

  mSharePathEditText.setText(savedInstanceState.getString(SHARE_PATH_KEY, ""));

  final boolean needsPassword = savedInstanceState.getBoolean(NEEDS_PASSWORD_KEY);
  setNeedsPasswordState(needsPassword);
  if (needsPassword) {
    mDomainEditText.setText(savedInstanceState.getString(DOMAIN_KEY, ""));
    mUsernameEditText.setText(savedInstanceState.getString(USERNAME_KEY, ""));
    mPasswordEditText.setText(savedInstanceState.getString(PASSWORD_KEY, ""));
  }
}
 
开发者ID:google,项目名称:samba-documents-provider,代码行数:16,代码来源:MountServerActivity.java

示例8: onRestoreInstanceState

import android.os.Bundle; //导入方法依赖的package包/类
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
    super.onRestoreInstanceState(savedInstanceState);

    mIsCapturing = savedInstanceState.getBoolean(KEY_IS_CAPTURING, mCameraData == null);
    if (mCameraData != null) {
        setupImageDisplay();
    } else {
        setupImageCapture();
    }
}
 
开发者ID:publiclab,项目名称:SmART-Form,代码行数:12,代码来源:CameraActivity.java

示例9: onResult

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onResult(Bundle result) {
	mNumResults++;
	if (result == null) {
		onError(AccountManager.ERROR_CODE_INVALID_RESPONSE, "null bundle");
		return;
	}
	if (result.getBoolean(AccountManager.KEY_BOOLEAN_RESULT, false)) {
		mAccountsWithFeatures.add(mAccountsOfType[mCurrentAccount]);
	}
	mCurrentAccount++;
	checkAccount();
}
 
开发者ID:codehz,项目名称:container,代码行数:14,代码来源:VAccountManagerService.java

示例10: MessageSecurityPresenter

import android.os.Bundle; //导入方法依赖的package包/类
public MessageSecurityPresenter(Bundle savedInstanceState, MessageSecurityMvpView messageSecurityMvpView) {
    this.messageSecurityMvpView = messageSecurityMvpView;

    if (savedInstanceState != null) {
        overrideCryptoWarning = savedInstanceState.getBoolean("overrideCryptoWarning");
    }
}
 
开发者ID:philipwhiuk,项目名称:q-mail,代码行数:8,代码来源:MessageSecurityPresenter.java

示例11: playVideo

import android.os.Bundle; //导入方法依赖的package包/类
private void playVideo(Video video, Bundle extras) {
    updateSelectedVideo(video);
    preparePlayer();
    setPlaybackState(PlaybackState.STATE_PAUSED);
    if (extras.getBoolean(AUTO_PLAY)) {
        play();
    } else {
        pause();
    }
}
 
开发者ID:nejtv,项目名称:androidtv-sample,代码行数:11,代码来源:PlaybackOverlayFragment.java

示例12: onPerformSync

import android.os.Bundle; //导入方法依赖的package包/类
/**
 * Called periodically by the system in every {@code FULL_SYNC_FREQUENCY_SEC}.
 */
@Override
public void onPerformSync(Account account, Bundle extras, String authority,
        ContentProviderClient provider, SyncResult syncResult) {
    Log.d(TAG, "onPerformSync(" + account + ", " + authority + ", " + extras + ")");
    String inputId = extras.getString(SyncAdapter.BUNDLE_KEY_INPUT_ID);
    if (inputId == null) {
        return;
    }
    XmlTvParser.TvListing listings = RichFeedUtil.getRichTvListings(mContext);
    LongSparseArray<XmlTvParser.XmlTvChannel> channelMap = TvContractUtils.buildChannelMap(
            mContext.getContentResolver(), inputId, listings.channels);
    boolean currentProgramOnly = extras.getBoolean(
            SyncAdapter.BUNDLE_KEY_CURRENT_PROGRAM_ONLY, false);
    long startMs = System.currentTimeMillis();
    long endMs = startMs + FULL_SYNC_WINDOW_SEC * 1000;
    if (currentProgramOnly) {
        // This is requested from the setup activity, in this case, users don't need to wait for
        // the full sync. Sync the current programs first and do the full sync later in the
        // background.
        endMs = startMs + SHORT_SYNC_WINDOW_SEC * 1000;
    }
    for (int i = 0; i < channelMap.size(); ++i) {
        Uri channelUri = TvContract.buildChannelUri(channelMap.keyAt(i));
        List<Program> programs = getPrograms(channelUri, channelMap.valueAt(i),
                listings.programs, startMs, endMs);
        updatePrograms(channelUri, programs);
    }
}
 
开发者ID:nejtv,项目名称:androidtv-sample,代码行数:32,代码来源:SyncAdapter.java

示例13: GroupCreateActivity

import android.os.Bundle; //导入方法依赖的package包/类
public GroupCreateActivity(Bundle args) {
    super(args);
    chatType = args.getInt("chatType", ChatObject.CHAT_TYPE_CHAT);
    isAlwaysShare = args.getBoolean("isAlwaysShare", false);
    isNeverShare = args.getBoolean("isNeverShare", false);
    isGroup = args.getBoolean("isGroup", false);
    maxCount = chatType == ChatObject.CHAT_TYPE_CHAT ? MessagesController.getInstance().maxMegagroupCount : MessagesController.getInstance().maxBroadcastCount;
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:9,代码来源:GroupCreateActivity.java

示例14: doUploadSettingChange

import android.os.Bundle; //导入方法依赖的package包/类
private void doUploadSettingChange(Context context, Intent intent) {
    Log.i(TAG, "doUploadSettingChange");
    Bundle extras = intent.getExtras();
    boolean isAgreeUpload = extras.getBoolean("isAgreeUpload");
    Log.i(TAG, "isAgreeUpload: " + isAgreeUpload);
}
 
开发者ID:quanzhuo,项目名称:prada,代码行数:7,代码来源:SettingReceiver.java

示例15: onCreate

import android.os.Bundle; //导入方法依赖的package包/类
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (savedInstanceState != null) {
        boolean isSupportHidden = savedInstanceState.getBoolean(STATE_SAVE_IS_HIDDEN);
        FragmentTransaction ft = getFragmentManager().beginTransaction();
        if (isSupportHidden) {
            ft.hide(this);
        } else {
            ft.show(this);
        }
        ft.commit();
    }
    Log.d(TAG, "onCreate: ");
}
 
开发者ID:hoangkien0705,项目名称:Android-UtilCode,代码行数:16,代码来源:BaseFragment.java


注:本文中的android.os.Bundle.getBoolean方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。