0
這可能會停止在EditText中渲染字符嗎?在我的代碼看起來像在Android的EditText停止字符渲染
public class EditorActivity extends Activity {
EditText editText = (EditText)findViewById(R.id.editText);
editText.addTextChangedListener(writerTextWatcher);
TextWatcher writerTextWatcher = new TextWatcher() {
@Override
public void afterTextChanged(Editable s) {
System.out.println("afterTextChanged");
editText.removeTextChangedListener(this);
editText.addTextChangedListener(this);
return ;
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {
// TODO Auto-generated method stub
System.out.println("beforeTextChanged");
editText.removeTextChangedListener(this);
editText.addTextChangedListener(this);
return;
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
editText.removeTextChangedListener(this);
System.out.println("onTextChanged");
editText.addTextChangedListener(this);
return;
}
};
}
我不能能阻止焦炭呈現在我的EDITTEXT。請指教。
感謝
S.Chinna