title: Populating spinner with EditText from another fragment in Android
body: <p>I have two fragment.In first one is EditText witch taking some info from user,and in another fragment having Spinner.I am sending EditText,that was first converted to String, to Spinner in second fragment with Android Navigation.And it shows text just fine but when i wish to add another text to Spinner it just replace first text and showing only one text/item in spinner. So my question how to have save text that i previously sent and have nice drop down spinner. BTW i am using data binding i don't know if it is important information for solutions.</p>
  <p>fragment from where i am sending data:</p>
  <pre><code>@Override
  public void onClickComplete() {
      String addCategoryString = addCategory.getText().toString();
      FluctuatingCategoryFragmentDirections.ActionFluctuatingCategoryToCreatingBudgetingItem2 action
              = FluctuatingCategoryFragmentDirections.actionFluctuatingCategoryToCreatingBudgetingItem2();
      action.setFluctuatingCategory(addCategoryString);
      navController.navigate(action);
  }
  </code></pre>
  <p>receiving fragment:</p>
  <pre><code>@Override
  public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
      super.onViewCreated(view, savedInstanceState);
  
      if (getArguments() != null) {
          CreatingBudgetingItemFragmentArgs args = CreatingBudgetingItemFragmentArgs.fromBundle(getArguments());
          String getCategory = args.getFluctuatingCategory();
          Log.i(&quot;Category: &quot;, getCategory);
          ArrayAdapter&lt;String&gt; spinnerAdapter = new ArrayAdapter&lt;&gt;(context, android.R.layout.simple_spinner_item, android.R.id.text1);
          spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
          spinner.setAdapter(spinnerAdapter);
          spinnerAdapter.notifyDataSetChanged();
      }
  }
  </code></pre>