Reputation: 9216
I have a AutoCompleteTextView and in setOnItemClickListener i want to check when user type an special text, AutoCompleteTextView clears and set to "". But when i do this an get an Stack Overflow Error. In general, every change in setOnItemClickListener generate Error!! i want to set some changes in my AutoCompleteTextView! How i can do this?
Upvotes: 1
Views: 4709
Reputation: 3804
Use a TextChangedListener instead of onItemListener
textView.addTextChangedListener(new TextWatcher() {
public void onTextChanged(CharSequence s, ....){
//if "s" is your "special" text clear the textview
}
});
Upvotes: 7