5
我需要带有固定后缀的EditText。我正在使用TextWatcher来捕获onTextChanged事件,但是如果我通过添加后缀再次更改文本,它将导致由无限递归引起的stackoverflow异常。带有固定后缀的Android EditText
msgtextview.addTextChangedListener(new TextWatcher() {
public void afterTextChanged(Editable s) {
//Doing some other stuff
msgtextview.setText("Changed Text") //This cause infinite recursion
}
}
下面的代码。
发布您的代码,以便有人可以提供帮助,有十亿种方法可以导致无限递归,我们需要看看您在做什么。 – blindstuff 2010-10-29 17:12:00