Android - AutoCompleteTextView only works when backspacing

后端 未结 2 1331
无人及你
无人及你 2021-01-06 16:25

I have an AutoCompleteTextView that dynamically updates the list of suggestions as the user types. My problem is that as I type the list gets updated but the dr

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-06 17:07

    It could have something to do with autoText.showDropDown() not being called in main thread. maybe you can try to do this instead:

    autoText.getHandler().post(new Runnable() {
        @Override
        public void run() {
            autoText.showDropDown();
        }
    })
    

提交回复
热议问题