I have implemented a TextWatcher on my AutoCompletionTextView and I am trying to work with the isPerformingAutoCompletion method as a means to check if AutoCompletion successful (i.e. a match exists).
But it seems the isPerformingAutoCompletion always returns false even though autoCompletion has potential matches?
I'm using a simple array adapter with ACTV:
private void initQuickSelect()
quickSelectAdapter = new ArrayAdapter<>(this,android.R.layout.simple_list_item_1, Items );
acTextView = (AutoCompleteTextView) findViewById(R.id.actv_view);
acTextView.setAdapter(quickSelectAdapter);
}
and my TextWatcher:
private void setupTextListener(){
acTextView.addTextChangedListener(new TextWatcher() {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void afterTextChanged(Editable s) {
if(s.length() > 0){
Log.d("gw", String.valueOf(acTextView.isPerformingCompletion()));
}
}
});
}
the debug log always returns false, any ideas where I'm going wrong?