This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.text.Editable; | |
import android.text.TextWatcher; | |
import android.widget.EditText; | |
public class PhoneFormatter implements TextWatcher { | |
private static final String PHONE_MASK = "(##) #####-####"; | |
private final char[] PHONE_MASK_ARRAY = PHONE_MASK.toCharArray(); | |
private boolean isInTextChanged = false; | |
private boolean isInAfterTextChanged = false; |