To solve this problem, what I did was
1.- create a handler to pause before reading the text.
Handler handler = new Handler();
handler.postDelayed(new Runnable()
{
public void run()
{
EditText.requestFocus(); // Darle foco
EditText.setText(""+cantidad_);
}
}, 1000); // 1 segundo
2.-
then copy the same action as in the "selectonclicklistener" of the Autocompletetexview in the TextWatcher in the method 'public void afterTextChanged (editable Editable)'.
2.-
spproducto.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void afterTextChanged(Editable editable)
{
// CODIGO AQUI
}
});