You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val postCodeMask = Mask(
value = "___ ___",
character = '_',
style = MaskStyle.NORMAL
)
I get an IndexOutOfBoundsExeption when hitting the space character when the user hits the space bar key, not sure if this an expected behaviour. I would expect here the space bar to be treated as the space character.
Stack trace:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: __________________t, PID: 21295
java.lang.IndexOutOfBoundsException: setSpan (5 ... 5) ends beyond length 4
at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1325)
at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:684)
at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:676)
at android.text.Selection.setSelection(Selection.java:94)
at android.text.Selection.setSelection(Selection.java:78)
at android.text.Selection.setSelection(Selection.java:153)
at com.santalu.maskara.MaskResultKt.apply(MaskResult.kt:26)
at com.santalu.maskara.MaskChangedListener.afterTextChanged(MaskChangedListener.kt:31)
at android.widget.TextView.sendAfterTextChanged(TextView.java:10551)
at android.widget.TextView$ChangeWatcher.afterTextChanged(TextView.java:13388)
at android.text.SpannableStringBuilder.sendAfterTextChanged(SpannableStringBuilder.java:1277)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:577)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:507)
at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:37)
at android.view.inputmethod.BaseInputConnection.replaceText(BaseInputConnection.java:843)
at android.view.inputmethod.BaseInputConnection.commitText(BaseInputConnection.java:197)
at com.android.internal.widget.EditableInputConnection.commitText(EditableInputConnection.java:177)
at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:339)
at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:89)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
The text was updated successfully, but these errors were encountered:
Using the following mask.
I get an IndexOutOfBoundsExeption when hitting the space character when the user hits the space bar key, not sure if this an expected behaviour. I would expect here the space bar to be treated as the space character.
Stack trace:
The text was updated successfully, but these errors were encountered: