How can I include a dash after the 3rd and 6th digit from a phone number and also how can I delete that dash if I press backspace? I am assuming that i have to use:
editText.addTextChangedListener(new TextWatcher);
Can someone help me with this? This is not a duplicate question cause the one you have shown me dose not cover the deletion of the dash. If you copy that code and try it, you will see that if you press backspace after you have more than 3 digits, the cursor will freeze before the dash.