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
I have solved the same problem with this code:
contacts_search.addTextChangedListener(new TextWatcher() {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
// TODO Auto-generated method stub
contacts_search.dismissDropDown();
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {
// TODO Auto-generated method stub
contacts_search.dismissDropDown();
}
@Override
public void afterTextChanged(Editable s) {
// TODO Auto-generated method stub
contacts_search.dismissDropDown();
}
});
Here, contacts_search is my AutoCompleteTextView