本文整理汇总了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();
}
示例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);
}
}
示例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);
}
示例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);
}
}
}
示例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");
}
示例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);
}
示例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, ""));
}
}
示例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();
}
}
示例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();
}
示例10: MessageSecurityPresenter
import android.os.Bundle; //导入方法依赖的package包/类
public MessageSecurityPresenter(Bundle savedInstanceState, MessageSecurityMvpView messageSecurityMvpView) {
this.messageSecurityMvpView = messageSecurityMvpView;
if (savedInstanceState != null) {
overrideCryptoWarning = savedInstanceState.getBoolean("overrideCryptoWarning");
}
}
示例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();
}
}
示例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);
}
}
示例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;
}
示例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);
}
示例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: ");
}