title: How to disable dropdown list auto-opening in AutoCompleteTextView when notifyDataSetChanged() called?
body: <p>Here's my problem:</p>
  
  <p>In my android app I use AutoCompleteTextView and refresh items list for each 5 seconds. Refreshing is working, when I call notifyDataSetChanged(). But when I type here something and it'll give me the list of matching items and then I close it manually, when another thread is refreshing the list and calling notifyDataSetChanged() dropdown list is showing automatically (even if I closed it before). And it's really annoying, because if list is long it takes whole screen and after closing it'll appear in another 5 secounds.
  I tried dismissDropDown() just after calling notifyDataSetChanged(), but it doesn't have any effect. It looks like dropdown is showing with a little delay. It's also not good way to fix it, because if user hasn't closed the list it'll close after a refresh. Also tried to take focus away - still no effect.</p>
  
  <p>So I need a method to:
  update my items list (via notifyDataSetChanged()) without automatically showing dropdown list, but if dropdown was already showed don't close it.</p>
  
  <p>Hope you can help,</p>
  
  <p>cheers</p>
  
  <hr>
  
  <p>I did it, finally. I post here a solution, maybe someone will use this.</p>
  
  <p>To check if dropdown is visible:</p>
  
  <pre><code>final boolean isVisible = autocomplete.isPopupShowing();
  </code></pre>
  
  <p>Next, call notifyDataSetChanged(),</p>
  
  <p>Finally:</p>
  
  <pre><code>new Handler().post(new Runnable(){
  
  @Override
  public void run() {
      if(!isVisible){
          autocomplete.dismissDropDown();
      }
  }
  
  });
  </code></pre>
  
  <p>This works perfectly.</p>