문제

I have an AutoCompleteTextView in my app that connects to a remote site to fetch suggestions. While suggestions are fetched I show a list of one item saying "searching, please wait". After the request completes, I update the suggestion list adapter and call notifyDataSetChanged.

Then the list contents changes to new suggestions (as expected), but somehow the list remains 1 cell in height, so that only the top suggestion is visible. How to force the view to re-calculate the dropdown height?

도움이 되었습니까?

해결책

It seems that showDropDown() forces re-evaluation of the suggestion list height. Unfortunately, it also forces it to show, but for my purposes it was acceptable.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top