Is it possible to auto insert characters into an EditText as the user inputs data?
I.e. if the user is entering a long number such as <
@Override
public void afterTextChanged(Editable s) {
if(s.length() == 3 && len < s.length()){
s.append(" - ");
}
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {
len = s.length();
}
This will do as well, only this code will insert " - " after 3rd character.