the following is my code :
name = (EditText)findViewById(R.id.editText1);
name.addTextChangedListener(new TextWatcher(){
public void afterTextChanged(Editable s) {
name.setText(s.toString()+"-");
}
public void beforeTextChanged(CharSequence s, int start, int count, int after){ }
public void onTextChanged(CharSequence s, int start, int before, int count){ }
});
But I get the app to force close , when remove setText() the app works fine