try this way.
edittext.addTextChangedListener(new TextWatcher() {
public void afterTextChanged(Editable s) { }
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
public void onTextChanged(CharSequence s, int start, int before, int count) {
String result = s.toString().replaceAll(" ", "#");
if (!s.toString().equals(result)) {
ed.setText(result);
ed.setSelection(result.length());
}
}
});
1
solved when user type abc xyz then show it as abc#xyz on screen