Preformatted string in a textbox


#1

Hi All,

Is it possible to have a preformatted string in a textbox? It’s something like a phone number, where I want to enter the phone number like: +99 (99) 99999-9999. And after this to get only the numbers typed there? I mean, to get 9999999999999 only.

TIA,


#2


#3

And the opposite


#4

@Peter, thank you for your answer… It’s gonna be useful to me… Now my doubt is: Is it possible during entering the number to maintain the “mask” while inputing only numbers?


#5

Mabye @Ken can add that to his textbox extension.


#6

Great!!! I’m gonna talk to him!!! Thanks again, my friend!


#7

#8

Fantastic!!! It would be a good suggestion to be implemented in Appybuilder… Even implementing just this: mPhoneNumberEditText.addTextChangedListener(new PhoneNumberFormattingTextWatcher()); would be perfect, in my case.