title: AutocompleteTextView is not updated dynamically
body: <p>I am getting data (<code>List</code>) from an API and I am trying to update my <code>AutcompleteTextView</code> with this data.   </p>
  
  <p>This is how I currently do :<br>
  I have a <code>TextWatcher</code> which calls a the method to get the data in <code>afterTextChanged</code>, so every time the user stops typing the method is called, and the adapter is notified with ``notifyDataSetChanged :</p>
  
  <pre><code>//in onCreate
      addressAdapter = new ArrayAdapter&lt;String&gt;(this,android.R.layout.simple_dropdown_item_1line,suggestions_address);
      at_address.setAdapter(addressAdapter);
  
  ...
  
  @Override
          public void afterTextChanged(Editable s) {
  
              autoComplete(s);
  
              addressAdapter.notifyDataSetChanged();
  
              //suggestions_address is the updated list, and when I print it I can see the 
              //results so it is not empty
              Log.i("addresses",suggestions_address.toString());
  
          }
  
  ...
  
  class SuggestionQueryListener implements ResultListener&lt;List&lt;String&gt;&gt; {
      @Override
      public void onCompleted(List&lt;String&gt; data, ErrorCode error) {
          if (error != ErrorCode.NONE) {
              Toast.makeText(MainActivity2.this,error.toString(),Toast.LENGTH_LONG).show();
          } else {
              suggestions_address.clear();
              for(int i = 0;i&lt;data.size();i++){
                  suggestions_address.add(data.get(i));
              }
          }
      }
  }
  public void autoComplete(CharSequence s) {
      try {
  
          String term = s.toString();
          TextSuggestionRequest request = null;
          request = new TextSuggestionRequest(term).setSearchCenter(new GeoCoordinate(48.844900, 2.395658));
          request.execute(new SuggestionQueryListener());
          if (request.execute(new SuggestionQueryListener()) != ErrorCode.NONE) {
              //Handle request error
              //...
          }
      } catch (IllegalArgumentException ex) {
          //
      }
  }
  </code></pre>
  
  <p>But it seems that the adapter is not really updated because it doesn't show the suggestions when I type something.<br>
  Also, before doing this with an <code>AutoCompleteTextView</code> I did it with a <code>listView</code>, with the same process, and everything worked well.  </p>
  
  <p>Any ideas or solutions would be really appreciated</p>
  
  <p><strong>EDIT :</strong> I noticed something really strange : the data is not binded to the adapter, because <code>adapter#getCount</code> always returns 0, even if the list is not empty. But when I remove <code>at_address.setAdapter(addressAdapter)</code>, the data adapter is updated and <code>adapter#getCount</code> returns the right number of elements.   </p>
  
  <p>I am really confused right now, please help !</p>