I use the following code to set text to an AutoCompleteTextView field. But I noticed that when I set certain text (not all text, but some) to it, it will automatically pop u
wwyt, I simply reused your trick with removing the Adapter and these are the bare essentials to unfocus/dismiss the dropdown.
AutoCompleteTextView tvSuburbs;
ArrayAdapter a = (ArrayAdapter) tvSuburbs.getAdapter();
tvSuburbs.setAdapter(null); // Remove the adapter so we don't get a dropdown
tvSuburbs.setText(s.name); // when text is set programmatically.
tvSuburbs.setAdapter(a); // Restore adapter