How to get count of matching items in AutoCompleteTextView?

為{幸葍}努か 提交于 2020-03-25 03:27:46

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!