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
You can't instantiate MaskedEditText programmatically with new MaskedEditText(mContext) constructor, because when you call setMask() there is no charRepresentation for generatePositionArrays() to match every mask char therefore rawToMask has zero length and selection = rawToMask[0]; fails with ArrayIndexOutOfBoundsException. BUT you can't setCharRepresentation() either, because mask is null and there is no null check in generatePositionArrays() on mask.length() call.
I guess setting default charRepresentation statically or setting mask to "" would fix the issue
The text was updated successfully, but these errors were encountered:
You can't instantiate MaskedEditText programmatically with
new MaskedEditText(mContext)
constructor, because when you callsetMask()
there is nocharRepresentation
forgeneratePositionArrays()
to match every mask char thereforerawToMask
has zero length andselection = rawToMask[0];
fails with ArrayIndexOutOfBoundsException. BUT you can'tsetCharRepresentation()
either, because mask is null and there is no null check ingeneratePositionArrays()
on mask.length() call.I guess setting default charRepresentation statically or setting
mask
to "" would fix the issueThe text was updated successfully, but these errors were encountered: