List of usage examples for android.os Bundle putSerializable
@Override public void putSerializable(@Nullable String key, @Nullable Serializable value)
From source file:com.wenwen.chatuidemo.activity.AddContactActivity.java
/** * contact//from w ww . j a va 2s. co m * * @param view */ public void addContact(View view) { if (DemoApplication.getInstance().getUserName().equals(nameText.getText().toString())) { startActivity(new Intent(this, AlertDialog.class).putExtra("msg", "?")); return; } final ProgressDialog pd = new ProgressDialog(AddContactActivity.this); pd.setMessage("..."); RequestParams params = new RequestParams(); DebugLog.i(TAG, "uid" + DemoApplication.getInstance().getUserUid()); params.put("fromuid", DemoApplication.getInstance().getUserUid()); params.put("touid", myUser.getAccount_id()); params.put("flag", "1"); HttpClientRequest.post(Urls.FRIENDSSET, params, 3000, new AsyncHttpResponseHandler() { @Override public void onStart() { // TODO Auto-generated method stub super.onStart(); pd.show(); } @Override public void onSuccess(int arg0, Header[] arg1, byte[] arg2) { // TODO Auto-generated method stub try { String res = new String(arg2); DebugLog.i(TAG, "" + res); JSONObject result = new JSONObject(res); switch (Integer.valueOf(result.getString("ret"))) { case 0: Toast.makeText(AddContactActivity.this, "", Toast.LENGTH_SHORT).show(); break; case 1: Toast.makeText(AddContactActivity.this, "?", Toast.LENGTH_SHORT).show(); Bundle bundle = new Bundle(); bundle.putSerializable("myuser", myUser); Intent data = new Intent(); data.putExtras(bundle); setResult(Activity.RESULT_OK, data); // ??? finish(); break; case -2: Toast.makeText(AddContactActivity.this, "??", Toast.LENGTH_SHORT).show(); break; default: break; } } catch (NumberFormatException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } } @Override public void onFinish() { // TODO Auto-generated method stub super.onFinish(); pd.dismiss(); } @Override public void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) { // TODO Auto-generated method stub } }); }
From source file:alba_manager.albamanager.Util.colorpicker.ColorPickerDialog.java
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putIntArray(KEY_COLORS, mColors); outState.putSerializable(KEY_SELECTED_COLOR, mSelectedColor); }
From source file:com.auth0.lock.util.LockFragmentBuilder.java
public Fragment social() { final SocialFragment fragment = new SocialFragment(); if (lock.getConfiguration() != null) { Bundle bundle = new Bundle(); bundle.putStringArrayList(SocialFragment.SOCIAL_FRAGMENT_STRATEGIES_ARGUMENT, activeSocialStrategies()); bundle.putSerializable(BaseTitledFragment.AUTHENTICATION_PARAMETER_ARGUMENT, new HashMap<>(lock.getAuthenticationParameters())); fragment.setArguments(bundle);/*from ww w. j av a 2 s . c o m*/ } return fragment; }
From source file:com.meinv.ui.fragment.ImagesListFragment.java
@Override public void navigateToImagesDetail(int position, List<ImagesListEntity> entitys, int x, int y, int width, int height) { Bundle extras = new Bundle(); extras.putSerializable(ImagesDetailActivity.INTENT_IMAGE_URLS, (Serializable) entitys); extras.putInt(ImagesDetailActivity.INTENT_IMAGE_POSITION, position); extras.putInt(ImagesDetailActivity.INTENT_IMAGE_X_TAG, x); extras.putInt(ImagesDetailActivity.INTENT_IMAGE_Y_TAG, y); extras.putInt(ImagesDetailActivity.INTENT_IMAGE_W_TAG, width); extras.putInt(ImagesDetailActivity.INTENT_IMAGE_H_TAG, height); readyGo(ImagesDetailActivity.class, extras); getActivity().overridePendingTransition(0, 0); }
From source file:com.ev.contactsmultipicker.ContactListFragment.java
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putSerializable(SAVE_STATE_KEY, results); }
From source file:org.mifos.androidclient.main.LastRepaymentReportActivity.java
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if (mLastRepayments != null) { outState.putSerializable(LastRepayment.BUNDLE_KEY, mLastRepayments.toArray()); }//from ww w . j a v a 2 s. co m }
From source file:com.kangsoo.pharmacy.fragment.IssuesFragment.java
@Override public void onCreateOptionsMenu(Menu optionsMenu, MenuInflater inflater) { inflater.inflate(R.menu.issues, optionsMenu); SearchManager searchManager = (SearchManager) getActivity().getSystemService(Context.SEARCH_SERVICE); MenuItem searchItem = optionsMenu.findItem(R.id.m_search); SearchView searchView = (SearchView) MenuItemCompat.getActionView(searchItem); searchView.setSearchableInfo(searchManager.getSearchableInfo(getActivity().getComponentName())); Bundle args = new Bundle(); //kskim to-do args.putSerializable(EXTRA_REPOSITORY, shoppingCategory); searchView.setAppSearchData(args);/*from w w w .j a v a2 s.com*/ }
From source file:org.mifos.androidclient.main.OverdueBorrowersListActivity.java
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if (mOverdueCustomers != null) { outState.putSerializable(CustomersData.BUNDLE_KEY, mOverdueCustomers.toArray()); }/*from ww w . j a v a 2 s . c o m*/ }
From source file:ca.hoogit.soundchooser.SoundChooserDialog.java
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putIntArray(KEY_SOUNDS, mSounds); outState.putSerializable(KEY_SELECTED_SOUND, mSelectedSound); }