List of usage examples for android.os Bundle putInt
public void putInt(@Nullable String key, int value)
From source file:com.google.android.apps.dashclock.api.ExtensionData.java
/** * Serializes the contents of this object to a {@link Bundle}. *//*from w ww . j a v a2 s. c o m*/ public Bundle toBundle() { Bundle data = new Bundle(); data.putBoolean(KEY_VISIBLE, mVisible); data.putInt(KEY_ICON, mIcon); data.putString(KEY_ICON_URI, (mIconUri == null ? null : mIconUri.toString())); data.putString(KEY_STATUS, mStatus); data.putString(KEY_EXPANDED_TITLE, mExpandedTitle); data.putString(KEY_EXPANDED_BODY, mExpandedBody); data.putString(KEY_CLICK_INTENT, (mClickIntent == null) ? null : mClickIntent.toUri(0)); data.putString(KEY_CONTENT_DESCRIPTION, mContentDescription); return data; }
From source file:com.romanenco.gitt.BrowserActivity.java
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putSerializable(REPO, current); outState.putSerializable(PATH, path); outState.putInt(FILTER, filterBar.getVisibility()); }
From source file:it.scoppelletti.mobilepower.app.FragmentLayoutController.java
/** * Salva lo stato dell’istanza. * //w ww . java2s. c o m * <P>L’attività salva lo stato dell’istanza * {@code FragmentLayoutController} all’interno del proprio metodo * {@code onSaveInstanceState}.</P> * * @param outState Stato da salvare. */ public void onSaveInstanceState(Bundle outState) { if (outState == null) { throw new NullPointerException("Argument outState is null."); } outState.putInt(FragmentLayoutController.STATE_PANELCOUNT, myFrameCount); }
From source file:com.skubit.android.billing.BillingServiceBinder.java
@Override public Bundle getUserIds(int apiVersion, String packageName) throws RemoteException { Bundle bundle = new Bundle(); if (apiVersion != 1) { bundle.putInt("RESPONSE_CODE", BillingResponseCodes.RESULT_BILLING_UNAVAILABLE); return bundle; }//from w w w.ja v a 2s.co m int packValidate = validatePackageIsOwnedByCaller(packageName); if (packValidate != BillingResponseCodes.RESULT_OK) { Log.d(TAG, "Package is not owned by caller: " + packageName); bundle.putInt("RESPONSE_CODE", packValidate); return bundle; } ArrayList<String> userIds = new ArrayList<>(); final long token = Binder.clearCallingIdentity(); try { Cursor c = mContext.getContentResolver().query(AuthorizationColumns.CONTENT_URI, null, AuthorizationColumns.APP + "=?", new String[] { packageName }, null); AuthorizationCursor ac = new AuthorizationCursor(c); ac.moveToFirst(); for (int i = 0; i < ac.getCount(); i++) { ac.moveToPosition(i); userIds.add(ac.getBitid()); } c.close(); } finally { Binder.restoreCallingIdentity(token); } bundle.putStringArrayList("USER_ID_LIST", userIds); return bundle; }
From source file:com.github.chenxiaolong.dualbootpatcher.MainActivity.java
@Override public void onSaveInstanceState(Bundle savedInstanceState) { super.onSaveInstanceState(savedInstanceState); savedInstanceState.putInt(EXTRA_FRAGMENT, mFragment); savedInstanceState.putInt(EXTRA_TITLE, mTitle); savedInstanceState.putInt(EXTRA_SELECTED_ITEM, mDrawerItemSelected); }
From source file:com.github.chenxiaolong.dualbootpatcher.settings.RomSettingsFragment.java
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putInt(EXTRA_TASK_ID_CHECK_SUPPORTED, mTaskIdCheckSupported); outState.putInt(EXTRA_TASK_ID_GET_VERSION, mTaskIdGetVersion); outState.putInt(EXTRA_TASK_ID_INSTALL, mTaskIdInstall); outState.putInt(EXTRA_TASK_ID_UNINSTALL, mTaskIdUninstall); }
From source file:mobisocial.musubi.ui.fragments.FeedViewFragment.java
Bundle getLoaderArgs(int max) { Bundle b = new Bundle(); b.putInt("max", max); return b; }
From source file:com.mindmeapp.extensions.ExtensionData.java
/** * Serializes the contents of this object to a {@link Bundle}. *///from w w w .j a v a2s.co m public Bundle toBundle() { Bundle data = new Bundle(); data.putBoolean(KEY_VISIBLE, mVisible); data.putInt(KEY_ICON, mIcon); data.putString(KEY_ICON_URI, (mIconUri == null ? null : mIconUri.toString())); data.putString(KEY_STATUS_TO_DISPLAY, mStatusToDisplay); data.putString(KEY_STATUS_TO_SPEAK, mStatusToSpeak); data.putParcelable(KEY_VIEWS_TO_DISPLAY, mViewsToDisplay); data.putString(KEY_CONTENT_DESCRIPTION, mContentDescription); data.putSerializable(KEY_LANGUAGE_TO_SPEAK, mLanguageToSpeak); data.putInt(KEY_BACKGROUND, mBackground); data.putString(KEY_BACKGROUND_URI, (mBackgroundUri == null ? null : mBackgroundUri.toString())); return data; }
From source file:fr.cph.chicago.activity.StationActivity.java
@Override public void onSaveInstanceState(Bundle savedInstanceState) { savedInstanceState.putInt("stationId", mStationId); super.onSaveInstanceState(savedInstanceState); }
From source file:com.frostwire.android.gui.fragments.ImageViewerFragment.java
private Bundle prepareFileBundle(FileDescriptor fd, int offset, boolean inFullScreenMode) { Bundle result = new Bundle(); result.putBundle(EXTRA_FILE_DESCRIPTOR_BUNDLE, fd.toBundle()); result.putBoolean(EXTRA_IN_FULL_SCREEN_MODE, inFullScreenMode); result.putInt(EXTRA_ADAPTER_FILE_OFFSET, offset); return result; }