I have an edit text meant for searching purpose. I have added
searchET.addTextChangedListener(new TextWatcher() {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
// TODO Auto-generated method stub
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {
// TODO Auto-generated method stub
}
@Override
public void afterTextChanged(Editable s) {
// TODO Auto-generated method stub
//intent to another page where i show my search result
}
});
The problem is: When I give a search string for eg: "fort" i get the required result in the next page. But when I press the back button, it doesnt move to the previous page on its first click. I will have to press back button 4 times to goto the previous page. This is because my search string is of length 4 and each time a value is entered into the edittext, the textchangelistener is called. How can I solve this issue? Please reply. Thanks in advance.