• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Phone number format in EditText (XXX) YYY-ZZZZ

Hi friends,

This is sandeep,

My problem is: I am developing one applcation , In which When I enter phone number in EditText box I need it to be format that number to US phone format like (444) 555-6666. How to get those braces and - automatically while entering the number.


Guys please help me out with some sample code.


sry for my bad english.

Thanks in advance.
 
You will need to subclass EditText and implement this manually. It's possible that someone who has already done this has released it to the public, but I can't confirm, nor deny that.
 
You will need to subclass EditText and implement this manually. It's possible that someone who has already done this has released it to the public, but I can't confirm, nor deny that.
Thanks for your reply. And one more problem is How can I use a single TextWatcher for multiple EditText Boxes..?

Thanks in advance.
 
Hi friends,

This is sandeep,

My problem is: I am developing one applcation , In which When I enter phone number in EditText box I need it to be format that number to US phone format like (444) 555-6666. How to get those braces and - automatically while entering the number.


Guys please help me out with some sample code.


sry for my bad english.

Thanks in advance.

See if this helps you out at all: PhoneNumberFormattingTextWatcher | Android Developers
 
Back
Top Bottom