Hi all, I've an MultiAutoCompleteTextView in my app with a dynamic list. That is to say when user write letters, I call host to do a list with the words that begins with the letters written.
The Completion work fine when there is an answer but when the host give me an empty list It doesn't. When I have no answer I would like to write "No match" on the dropdown, It works but it appears only about 100/200 ms and if I continue to write letters It doesn't work anymore.
My code :
[...]
try {
// Call host to have list
List<Object> list = new ArrayList<Object>();
list = callHostToHaveList(search_pattern);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//there is suggestions ?
if(list.size==0){
Object noSug = new Object (-1);
noSug.setLabel("No Match");
list.add(noSug);
}
suggestionAdapter = new ZOKAdapter(this, R.layout.xml_dropdown,
list);
// Use to display label in the drop down list
searchZone.setAdapter(suggestionAdapter);
[...]