Pergunta

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?

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top