List of usage examples for android.os Bundle putSerializable
@Override public void putSerializable(@Nullable String key, @Nullable Serializable value)
From source file:org.mifos.androidclient.main.AccountTransactionHistoryActivity.java
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putSerializable(TransactionHistoryEntry.BUNDLE_KEY, (Serializable) mTransactionHistoryEntries); }
From source file:ca.rmen.android.networkmonitor.app.dialog.filechooser.FileChooserDialogFragment.java
@Override public void onSaveInstanceState(Bundle outState) { outState.putSerializable(EXTRA_FILE_CHOOSER_INITIAL_FOLDER, mSelectedFile); super.onSaveInstanceState(outState); Log.v(TAG, "onSavedInstanceState, outState=" + outState); }
From source file:org.mifos.androidclient.main.LoanInstallmentDetailsActivity.java
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putSerializable(LoanInstallmentDetails.BUNDLE_KEY, mDetails); }
From source file:com.github.mobile.ui.team.TeamListFragment.java
public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); if (org != null) outState.putSerializable(EXTRA_USER, org); }
From source file:com.joda.tentatime.FindExamActivity.java
private void setupWidgets() { Button btn = (Button) findViewById(R.id.searchB); btn.setOnClickListener(new View.OnClickListener() { @Override//w w w . jav a 2 s . c o m public void onClick(View v) { DownloadJsonTask task = new DownloadJsonTask(); task.execute(userChoice(mGetExam.getText().toString())); } }); mGetExam = (EditText) findViewById(R.id.getExam); examsView = (ListView) findViewById(R.id.examsLV); examsView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Intent intent = new Intent(FindExamActivity.this, Result.class); Bundle b = new Bundle(); b.putSerializable("key", (Serializable) results.get(position)); intent.putExtras(b); //deliver the exam to the next Intent startActivityForResult(intent, 1); } }); // CAST THE LINEARLAYOUT HOLDING THE MAIN PROGRESS (SPINNER) //linlaHeaderProgress = (LinearLayout) findViewById(R.id.linlaHeaderProgress); }
From source file:com.kalianey.oxapp.service.GcmBroadcastReceiver.java
@Override public void onReceive(Context context, Intent intent) { Bundle extras = intent.getExtras();//ww w. j a va2 s . c o m GoogleCloudMessaging gcm = GoogleCloudMessaging.getInstance(context); String messageType = gcm.getMessageType(intent); Log.d("Notif received", messageType.toString()); if (!extras.isEmpty()) { // has effect of unparcelling Bundle /* * Filter messages based on message type. Since it is likely that GCM * will be extended in the future with new message types, just ignore * any message types you're not interested in, or that you don't * recognize. */ if (GoogleCloudMessaging.MESSAGE_TYPE_MESSAGE.equals(messageType)) { // Is this our message?? Better be if you're going to act on it! if (MainActivity.PROJECT_NUMBER.equals(extras.getString(EXTRA_SENDER))) { // Process message and then post a notification of the received message. String type = extras.getString(EXTRA_TYPE); String message = extras.getString(EXTRA_MESSAGE); String dataString = extras.getString("extra"); //Build a conv to send to MessageView ModelConversation conversation = new ModelConversation(); try { JSONObject dataObj = new JSONObject(dataString); //{"senderId":3,"conversationId":2,"displayName":"Veda","recipientId":"1","message":"test again"} conversation.setId(dataObj.getString("conversationId")); conversation.setName(dataObj.getString("displayName")); conversation.setPreviewText(message); conversation.setOpponentId(dataObj.getString("senderId")); conversation.setInitiatorId(dataObj.getString("recipientId")); } catch (JSONException e) { e.printStackTrace(); } //Send notification String alert = "New message: " + message; sendNotification(context, alert); //Send to MessageFragment Intent broadcastIntent = new Intent(); Bundle mBundle = new Bundle(); mBundle.putSerializable("convObj", conversation); broadcastIntent.setAction("GCM_RECEIVED_ACTION"); broadcastIntent.putExtra("conversation", mBundle); broadcastIntent.putExtra("gcm", message); context.sendBroadcast(broadcastIntent); } Log.i(LOG_TAG, "Received: " + extras.toString()); } } }
From source file:com.auth0.lock.util.LockFragmentBuilder.java
public Fragment resetPassword() { final DatabaseChangePasswordFragment fragment = new DatabaseChangePasswordFragment(); Bundle arguments = new Bundle(); arguments.putSerializable(BaseTitledFragment.AUTHENTICATION_PARAMETER_ARGUMENT, new HashMap<>(lock.getAuthenticationParameters())); arguments.putBoolean(BaseTitledFragment.AUTHENTICATION_USES_EMAIL_ARGUMENT, lock.shouldUseEmail()); fragment.setArguments(arguments);/*w ww. j a va 2 s . c o m*/ return fragment; }
From source file:com.auth0.lock.util.LockFragmentBuilder.java
public Fragment login() { final DatabaseLoginFragment fragment = new DatabaseLoginFragment(); Bundle arguments = new Bundle(); arguments.putSerializable(BaseTitledFragment.AUTHENTICATION_PARAMETER_ARGUMENT, new HashMap<>(lock.getAuthenticationParameters())); arguments.putBoolean(BaseTitledFragment.AUTHENTICATION_USES_EMAIL_ARGUMENT, lock.shouldUseEmail()); fragment.setArguments(arguments);/* w w w .j a v a 2 s .c o m*/ return fragment; }
From source file:com.github.baoti.pioneer.ui.news.NewsActivity.java
private void navigateToDetail(News item) { Bundle args = new Bundle(2); args.putSerializable(EXTRA_NEWS, item); if (getIntent().hasExtra(EXTRA_EDITABLE)) { args.putBoolean(EXTRA_EDITABLE, getIntent().getBooleanExtra(EXTRA_EDITABLE, false)); }//w w w . j ava 2 s.c o m NewsDetailFragment fragment = NewsDetailFragment.newInstance(args); getSupportFragmentManager().beginTransaction() .replace(getSearchFragmentContainerId(), fragment, TAG_FRAG_DETAIL).addToBackStack(null).commit(); }
From source file:org.mifos.androidclient.main.DepositDueDetailsActivity.java
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putSerializable(SavingsAccountDepositDue.BUNDLE_KEY, mDetails); }