CountryCodePickerProject icon indicating copy to clipboard operation
CountryCodePickerProject copied to clipboard

Autoformat number

Open fahad-mukhtar opened this issue 4 years ago • 3 comments

how to autoformat a number with user adding +1 himself in the edittext field, in current scenario your library is allowing me to format a number without +1, but user wants to add whole number with country coude himself, like +12678462671, but your library is not formatting this

fahad-mukhtar avatar Jul 04 '20 11:07 fahad-mukhtar

If the user will add the full number himself, why are you using this library? Formatting phone number without CC behavior is normal and makes sense with library goal. Also you can get full formatted number by calling ccp.getFormattedFullNumber();

Mohammad699 avatar Jul 19 '20 13:07 Mohammad699

This function will give the formatted number in return, but user wants to format the number at run time. And the library only formats the number at run time when user start entering the number without +1 or any other country code.

On Sun, 19 Jul 2020, 6:25 pm Mohammad, [email protected] wrote:

If the user will add the full number himself, why are you using this library? Formatting phone number without CC behavior is normal and makes sense with library goal. Also you can get full formatted number by calling cpp.getFormattedFullNumber();

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hbb20/CountryCodePickerProject/issues/417#issuecomment-660643411, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMPYB4EDR6FQ6TEV352VNLDR4LX5JANCNFSM4OQLS7XA .

fahad-mukhtar avatar Jul 19 '20 13:07 fahad-mukhtar

The library built as CC selector so it doesn't make sense to put CC in edit text with phone number Ask your user to select CC from the ccp and enter his phone number in the edit text What's the problem with that? This is what this library built for brother. Or wait for the dev if he can make this change for you or fork the library and edit it yourself if you're in hurry.

Mohammad699 avatar Jul 19 '20 14:07 Mohammad699