问题
I'm trying to get count of matching items in AutoCompleteTextView
, or checking to see if there is at least one matching item. How do I do this?
回答1:
You can create you own custom view and override onFilterComplete
.
public class MAutoCompleteTextView extends AutoCompleteTextView {
@Override
public void onFilterComplete(int i) {
Log.i(TAG, "count of matching items: "+ i);
}
// Override the constructors
}
来源:https://stackoverflow.com/questions/35485479/how-to-get-count-of-matching-items-in-autocompletetextview