My textwatcher is working after I press backspace and then that suggestion comes.
I have a textwatcher that generates a list of books from web. I also waited to see whether its a net issue. But I found its not because of that, when I press backspace it start working smoothly.Please help
textWatcher = new TextWatcher()
{
public void afterTextChanged(Editable s)
{
chars = s;
currentSearch = s;
startSuggestionsThread(s);
}
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
public void onTextChanged(CharSequence s, int start, int before, int count){
}
};
I startsuggestionsthread I am doing textview.setAdapter(adapter). But its taking much time
Perhaps you are using your logic inside
afterTextChangedmethod of TextWatcher. Move your code tobeforeTextChangedin order to run your code before the text is changed in EditText