2013-01-23 104 views
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

回答

0

你可以簡單地刪除文本時,它的變化 - 用戶喜歡沒事在EDITTEXT呈現它將似乎。