From 95ef9008aee4285dc5a3096bfa26f6f3526003f7 Mon Sep 17 00:00:00 2001 From: Zotov Date: Mon, 15 Mar 2021 17:38:38 +0400 Subject: [PATCH] Fix Issue 63: Can't work without AttributeSet: NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' --- .../java/br/com/sapereaude/maskedEditText/MaskedEditText.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MaskedEditText/src/main/java/br/com/sapereaude/maskedEditText/MaskedEditText.java b/MaskedEditText/src/main/java/br/com/sapereaude/maskedEditText/MaskedEditText.java index 5d7f88c..8de76c0 100755 --- a/MaskedEditText/src/main/java/br/com/sapereaude/maskedEditText/MaskedEditText.java +++ b/MaskedEditText/src/main/java/br/com/sapereaude/maskedEditText/MaskedEditText.java @@ -4,7 +4,6 @@ import android.content.res.TypedArray; import android.os.Bundle; import android.os.Parcelable; -import android.support.v4.text.TextUtilsCompat; import android.support.v7.widget.AppCompatEditText; import android.text.Editable; import android.text.SpannableStringBuilder; @@ -56,6 +55,7 @@ public boolean onEditorAction(TextView v, int actionId,KeyEvent event) { public MaskedEditText(Context context) { super(context); init(); + charRepresentation = '#'; } public MaskedEditText(Context context, AttributeSet attrs) {