The Android autocomplete only starts after two letters. How can I make it so the list appears when the field is just selected?
Extend the AutoCompleteTextView, overriding the enoughToFilter() methods and the threshold methods so that it doesn't replace the 0 threshold with a 1 threshold:
public class MyAutoCompleteTextView extends AutoCompleteTextView {
private int myThreshold;
public MyAutoCompleteTextView(Context context) {
super(context);
}
public MyAutoCompleteTextView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
public MyAutoCompleteTextView(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public void setThreshold(int threshold) {
if (threshold < 0) {
threshold = 0;
}
myThreshold = threshold;
}
@Override
public boolean enoughToFilter() {
return getText().length() >= myThreshold;
}
@Override
public int getThreshold() {
return myThreshold;
}
}