List of usage examples for android.os Bundle putSerializable
@Override public void putSerializable(@Nullable String key, @Nullable Serializable value)
From source file:com.auth0.lock.util.LockFragmentBuilder.java
private Fragment enterpriseLoginWithConnection(Connection connection, boolean isRoot) { 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()); if (connection != null) { arguments.putParcelable(DatabaseLoginFragment.AD_ENTERPRISE_CONNECTION_ARGUMENT, connection); }//from w w w . ja v a2 s .c o m arguments.putBoolean(DatabaseLoginFragment.IS_MAIN_LOGIN_ARGUMENT, isRoot); fragment.setArguments(arguments); return fragment; }
From source file:com.github.mobile.ui.comment.RenderedCommentFragment.java
/** * Set text to render/*from w ww .j a va 2 s .co m*/ * * @param raw * @param repo */ public void setText(final String raw, final IRepositoryIdProvider repo) { Bundle args = new Bundle(); args.putCharSequence(ARG_TEXT, raw); if (repo instanceof Serializable) args.putSerializable(ARG_REPO, (Serializable) repo); getLoaderManager().restartLoader(0, args, this); Keyboard.hideSoftInput(bodyText); showLoading(true); }
From source file:com.eTilbudsavis.sdkdemo.Search.java
@Override protected void onSaveInstanceState(Bundle outState) { outState.putSerializable(ARG_OFFERS, (Serializable) mOffers); outState.putString(ARG_QUERY, mQuery.getText().toString()); }
From source file:activities.SpecialityActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.service_list); lv = (ListView) findViewById(R.id.list_view); inputSearch = (EditText) findViewById(R.id.inputSearch); //adapter = new ArrayAdapter<String>(activity, R.layout.service_list_item, R.id.service_name,services); adapter = new SpecialityAdapter(this, R.layout.service_list_item, Arrays.asList(services)); lv.setAdapter(adapter);// w w w.j a v a 2 s. c om inputSearch.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void onTextChanged(CharSequence s, int start, int before, int count) { adapter.getFilter().filter(s); } @Override public void afterTextChanged(Editable s) { } }); ((Button) findViewById(R.id.button)).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { for (int i = 0; i < specialities.size(); i++) { // Log.e("key", specialities+""); specialities_new = specialities; Log.e("key", specialities_new + ""); } // for(String speciality : specialities) { // //System.out.println(speciality); // Log.e("key", speciality); // key = speciality; // Log.e("keys", key+" "); // } // Intent returnIntent = new Intent(); // Bundle bundle = new Bundle(); // bundle.putSerializable("result", specialities_new); // returnIntent.putExtra(bundle); // setResult(1, returnIntent); Intent intent = new Intent(); Bundle bundle1 = new Bundle(); bundle1.putSerializable("passwords", specialities_new); intent.putExtras(bundle1); setResult(1, intent); finish(); } }); }
From source file:com.coinblesk.client.ui.dialogs.ProgressSuccessOrFailDialog.java
@Override public void onSaveInstanceState(Bundle state) { super.onSaveInstanceState(state); state.putSerializable(ARG_STATE, currentState); state.putString(ARG_TITLE, title);//from ww w . j av a 2 s. c om if (txtMessage != null) { state.putString(ARG_MESSAGE, txtMessage.getText().toString()); } }
From source file:com.tweetlanes.android.core.view.DirectMessageFeedFragment.java
public static DirectMessageFeedFragment newInstance(int laneIndex, final TwitterContentHandleBase handleBase, final String screenName, final String userName, final String laneIdentifier, final Long otherUserId, final String currentAccountKey, final String cachedMessages) { DirectMessageFeedFragment fragment = new DirectMessageFeedFragment(); fragment.mContentHandle = TwitterManager.get().getContentHandle(handleBase, screenName, laneIdentifier, currentAccountKey);/*from w w w .java 2 s . co m*/ fragment.configureBaseLaneFragment(laneIndex, fragment.mContentHandle.getTypeAsString(), new ConfigureBundleListener() { @Override public void addValues(Bundle args) { // TODO: serializing is a slow way of doing this... args.putSerializable("handleBase", handleBase); args.putString("screenName", screenName); args.putString("userName", userName); args.putString("laneIdentifier", laneIdentifier); if (otherUserId != null) { args.putLong("otherUserId", otherUserId); } if (cachedMessages != null) { args.putString("cachedMessages", cachedMessages); } } }); return fragment; }
From source file:com.judepereira.android.co.uncyclopedia.UncyclopediaActivity.java
@Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putSerializable("history", history); }
From source file:at.alladin.rmbt.android.fragments.result.QoSTestDetailPagerFragment.java
@Override public void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putSerializable(BUNDLE_QOS_RESULT_LIST, (Serializable) resultList); outState.putSerializable(BUNDLE_QOS_DESC_LIST, (Serializable) descList); }
From source file:brazole.com.secondtask.adapters.PagerAdapter.java
@Override public Fragment getItem(int position) { List issueListByType0 = CrudIssue.getIssuesByStatus(0); List issueListByType1 = CrudIssue.getIssuesByStatus(1); Bundle args = new Bundle(); switch (position) { case 0://from w ww . j a v a 2 s .co m TabFragmentRecyclerView fragment1 = new TabFragmentRecyclerView(); args.putSerializable("issueListByType0", (Serializable) issueListByType0); fragment1.setArguments(args); return fragment1; case 1: TabFragmentRecyclerView tab2 = new TabFragmentRecyclerView(); args.putSerializable("issueListByType1", (Serializable) issueListByType1); tab2.setArguments(args); return tab2; case 2: return new TabFragmentListView(); default: return null; } }
From source file:br.com.imovelhunter.imovelhunterwebmobile.GcmIntentService.java
private void sendNotification(String msg) { mNotificationManager = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE); Intent in = new Intent(this, ChatActivity.class); Bundle extras = new Bundle(); extras.putSerializable(Parametros.MENSAGEM_JSON.name(), this.mensagem); extras.putSerializable(ParametrosSessao.USUARIO_CHAT_ATUAL.name(), this.mensagem.getUsuarioRemetente()); in.putExtras(extras);/*from w ww . j ava 2 s .co m*/ PendingIntent contentIntent = PendingIntent.getActivity(this, 0, in, 0); NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this).setSmallIcon(R.drawable.icone) .setContentTitle("Imovel Hunter - " + mensagem.getUsuarioRemetente().getNomeUsuario()) .setStyle(new NotificationCompat.BigTextStyle().bigText(msg)).setContentText(msg); mBuilder.setAutoCancel(true); mBuilder.setContentIntent(contentIntent); mNotificationManager.notify(NOTIFICATION_ID, mBuilder.build()); this.vibrar(); }