I am appending "-" in edittext when text length is 3 or 7
.
Following is my code.
@Override
public void afterTextChanged(Editable editable) {
if(editable.length() == 3 || editable.length() == 7){
editable.append("-");
}
This works fine, and adds "-", but when i try to remove some text, it stuck on these places, so if i enter 221-
and then i press backspace it does not work, and does not allow me to remove these characters.