Disable Android AutoCompleteTextView after user selects item from drop down

前端 未结 5 1056
北海茫月
北海茫月 2021-02-07 06:47

I\'m using Android\'s AutoCompleteTextView with a CursorAdapter to add autocomplete to an app. In the view\'s onItemClickListener() (i.e.

5条回答
  •  太阳男子
    2021-02-07 07:45

    If you wish to dissmis AutoCompleteTextView's dropdown you should use its post(Runnable r) method. It works for me :)

    Here is an example:

    mAutoCompleteTextView.post(new Runnable() {
        public void run() {
            mAutoCompleteTextView.dismissDropDown();
        }
    }
    

提交回复
热议问题