Non-removable prefix
In some cases I need non-removable prefix. Add this feature, please :)
@milk-machine, how do you want to see a mask and a result of removing symbols?
Hey @milk-machine! Thanks for your suggestion.
I'll keep this feature request, though I can't say this feature will come out soon. It's a little bit controversial, plus the implementation raises lots of design questions, including the one above by @CoolMind
yes this is very needed, ThnQ
Hi, @taflanidi is there any update?
P.S. As there is no official solution I would like to introduce a shortcut. Just override afterTextChanged method in MaskedTextChangedListener:
override fun afterTextChanged(edit: Editable?) {
val text = field.text.toString()
if (!text.startsWith(nonRemovePrefix)) {
setText(nonRemovePrefix, field)
} else {
super.afterTextChanged(edit)
}
}
https://gist.github.com/dmersiyanov/2b8f6f9472969fc0dd23749ec8f5c8f0
I'll look into pulling this into the core, thank you so much!