當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。