access edittext from textwatcher
<p>I am using a textWatcher :</p>

<pre><code>final EditText et = (EditText) findViewById(R.id.editText1);
final TextView tv = (TextView) findViewById(R.id.textView2);

    et.addTextChangedListener(new TextWatcher()
    {
            public void afterTextChanged(Editable s){
                    if(s.length() &gt; 0) {
                    tv.setText(s.toString().substring(s.length()-1));
                    et.setText("");
                }
            }
            public void beforeTextChanged(CharSequence s,int start,int count, int after){} 
            public void onTextChanged(CharSequence s, int start, int before, int count) {}
    });
</code></pre>

<p>this return error ,I can't access the et.setText because it's final maybe or because it's locked by the Keyboard , any idea ?</p>

<p>Log cat :</p>

<pre><code>06-02 13:35:25.139: D/AndroidRuntime(12532): Shutting down VM
06-02 13:35:25.139: W/dalvikvm(12532): threadid=1: thread exiting with uncaught exception (group=0x40018578)
06-02 13:35:25.219: E/AndroidRuntime(12532): FATAL EXCEPTION: main
06-02 13:35:25.219: E/AndroidRuntime(12532): java.lang.StackOverflowError
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView$InsertionPointCursorController.hide(TextView.java:8609)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.hideInsertionPointCursorController(TextView.java:9088)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.hideControllers(TextView.java:9105)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2677)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2662)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.EditText.setText(EditText.java:178)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2637)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at com.pack.witch.Input$1.beforeTextChanged(Input.java:27)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.sendBeforeTextChanged(TextView.java:6554)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2702)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2662)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.EditText.setText(EditText.java:178)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2637)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at com.pack.witch.Input$1.beforeTextChanged(Input.java:27)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.sendBeforeTextChanged(TextView.java:6554)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2702)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2662)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.EditText.setText(EditText.java:178)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2637)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at com.pack.witch.Input$1.beforeTextChanged(Input.java:27)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.sendBeforeTextChanged(TextView.java:6554)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2702)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2662)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.EditText.setText(EditText.java:178)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2637)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at com.pack.witch.Input$1.beforeTextChanged(Input.java:27)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.sendBeforeTextChanged(TextView.java:6554)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2702)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2662)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.EditText.setText(EditText.java:178)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2637)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at com.pack.witch.Input$1.beforeTextChanged(Input.java:27)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.sendBeforeTextChanged(TextView.java:6554)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2702)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2662)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.EditText.setText(EditText.java:178)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2637)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at com.pack.witch.Input$1.beforeTextChanged(Input.java:27)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.sendBeforeTextChanged(TextView.java:6554)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2702)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2662)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.EditText.setText(EditText.java:178)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2637)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at com.pack.witch.Input$1.beforeTextChanged(Input.java:27)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.sendBeforeTextChanged(TextView.java:6554)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2702)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2662)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.EditText.setText(EditText.java:178)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2637)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at com.pack.witch.Input$1.beforeTextChanged(Input.java:27)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.sendBeforeTextChanged(TextView.java:6554)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2702)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2662)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.EditText.setText(EditText.java:178)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2637)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at com.pack.witch.Input$1.beforeTextChanged(Input.java:27)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.sendBeforeTextChanged(TextView.java:6554)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2702)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2662)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.EditText.setText(EditText.java:178)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2637)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at com.pack.witch.Input$1.beforeTextChanged(Input.java:27)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.sendBeforeTextChanged(TextView.java:6554)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2702)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2662)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.EditText.setText(EditText.java:178)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at android.widget.TextView.setText(TextView.java:2637)
06-02 13:35:25.219: E/AndroidRuntime(12532):    at com.pack.witch.Input
</code></pre>

<p>Ps : I need to change what the user types for example if he types "A" I'll show "D" it make it looks like he types "D"</p>
