List of usage examples for android.os Bundle putInt
public void putInt(@Nullable String key, int value)
From source file:de.stadtrallye.rallyesoft.MainActivity.java
@Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); Log.i(THIS, "Receiving Intent"); if (intent != null && intent.hasExtra(Std.TAB)) { Log.i(THIS, "Receiving Intent with Tab"); if (intent.getStringExtra(Std.TAB).equals(Std.CHATROOM)) { int chatroom = intent.getIntExtra(Std.CHATROOM, -1); int chatID = intent.getIntExtra(Std.CHAT_ID, -1); Bundle b = new Bundle(); b.putInt(Std.CHATROOM, chatroom); b.putInt(Std.CHAT_ID, chatID); tabManager.setArguments(RallyeTabManager.TAB_CHAT, b); tabManager.switchToTab(RallyeTabManager.TAB_CHAT); }/*from w ww . j ava 2 s .c o m*/ } }
From source file:org.ale.scanner.zotero.web.zotero.ZoteroAPIClient.java
public void addItems(JSONObject items, int[] rows, int userOrGroupId) throws UnsupportedEncodingException, IllegalArgumentException { // POST https://apis.zotero.org/users/<userid>/items if (rows.length > ZoteroAPIClient.MAX_UPLOAD_CNT) { throw new IllegalArgumentException("Maximum upload size exceeded"); }/* w w w . j a v a 2 s . co m*/ APIRequest r = newRequest(); r.setHttpMethod(APIRequest.POST); HashMap<String, String> queryTerms = new HashMap<String, String>(); queryTerms.put("content", "json"); queryTerms.put("key", mAccount.getKey()); r.setURI(buildURI(queryTerms, String.valueOf(userOrGroupId), "items")); r.setContent(items.toString(), "application/json"); r.addHeader(HDR_WRITE_TOKEN, newWriteToken()); Bundle extra = new Bundle(); extra.putIntArray(EXTRA_ITEM_IDS, rows); extra.putInt(EXTRA_REQ_TYPE, ZoteroAPIClient.ITEMS); r.setExtra(extra); mRequestQueue.enqueue(r); }
From source file:com.otaupdater.OTAUpdaterActivity.java
@Override protected void onSaveInstanceState(@NotNull Bundle outState) { super.onSaveInstanceState(outState); outState.putInt(KEY_TAB, bar.getSelectedNavigationIndex()); }
From source file:com.lepin.activity.PincheTrailActivity.java
/** * ?//www .j ava 2s . c o m */ private void getBook() { List<NameValuePair> params = new ArrayList<NameValuePair>(); params.add(new BasicNameValuePair("infoId", String.valueOf(pinche_id))); util.doPostRequest(PincheTrailActivity.this, new OnHttpRequestDataCallback() { public void onSuccess(String result) { String bookId = doBooking(result); if (null != bookId) { Bundle bundle = new Bundle(); bundle.putString(Constant.BOOK_ID, bookId); bundle.putInt(Constant.START_LAT, mStartLat); bundle.putInt(Constant.START_LON, mStartLon); bundle.putInt(Constant.END_LAT, mEndLat); bundle.putInt(Constant.END_LON, mEndLon); util.go2OrderDetail(PincheTrailActivity.this, bundle); } } }, params, Constant.URL_ADDBOOK, getString(R.string.my_book_ing) + "...", false); }
From source file:com.android.gallery3d.app.Gallery.java
private void startGetContent(Intent intent) { Bundle data = intent.getExtras() != null ? new Bundle(intent.getExtras()) : new Bundle(); data.putBoolean(KEY_GET_CONTENT, true); int typeBits = GalleryUtils.determineTypeBits(this, intent); data.putInt(KEY_TYPE_BITS, typeBits); data.putString(AlbumSetPage.KEY_MEDIA_PATH, getDataManager().getTopSetPath(typeBits)); getStateManager().setLaunchGalleryOnTop(true); getStateManager().startState(AlbumSetPage.class, data); }
From source file:com.github.jimcoven.nodeauth.GoogleLoginManager.java
public void saveState(Bundle state) { state.putInt(LOGIN_STATE_KEY, mLoginState); }
From source file:com.ryan.ryanreader.activities.PostSubmitActivity.java
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putString("post_title", titleEdit.getText().toString()); outState.putString("post_body", textEdit.getText().toString()); outState.putString("subreddit", subredditEdit.getText().toString()); outState.putInt("post_type", typeSpinner.getSelectedItemPosition()); }
From source file:org.klnusbaum.udj.EventListFragment.java
public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putParcelable(LOCATION_STATE_EXTRA, lastKnown); outState.putInt(EVENT_SEARCH_TYPE_EXTRA, lastSearch.getSearchType()); if (lastSearch.getSearchType() == NameEventSearch.SEARCH_TYPE) { outState.putString(EVENT_SEARCH_QUERY, ((NameEventSearch) lastSearch).getQuery()); }/* ww w .java 2 s .c om*/ }
From source file:com.yschi.castscreen.MainActivity.java
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if (mResultData != null) { outState.putInt(STATE_RESULT_CODE, mResultCode); outState.putParcelable(STATE_RESULT_DATA, mResultData); }// w ww .j ava2 s .c o m }
From source file:com.eutectoid.dosomething.picker.PlacePickerFragment.java
void saveSettingsToBundle(Bundle outState) { super.saveSettingsToBundle(outState); outState.putInt(RADIUS_IN_METERS_BUNDLE_KEY, radiusInMeters); outState.putInt(RESULTS_LIMIT_BUNDLE_KEY, resultsLimit); outState.putString(SEARCH_TEXT_BUNDLE_KEY, searchText); outState.putParcelable(LOCATION_BUNDLE_KEY, location); outState.putBoolean(SHOW_SEARCH_BOX_BUNDLE_KEY, showSearchBox); }