hbb20 / CountryCodePickerProject

Country Code Picker (CCP) is an android library which provides an easy way to search and select country or international phone code. Also supports Android EditText phone mask and international phone validation.
Apache License 2.0
1.51k stars 504 forks source link

Wrong US Number formating. #577

Open SardarkhanStella opened 1 year ago

SardarkhanStella commented 1 year ago

Hi , Thanks for this library. But i see that When you select country US (+1) and type 4696641777 in Carrier Edit Text, it will be formatted for US number format 469-664-1777 as you type in. Like this But US format number should be like this. (469)-664-1777 can we do this in this library? Thanks I am waiting for your reply.

SardarkhanStella commented 1 year ago

@hbb20

hbb20 commented 1 year ago

Hi, so both are valid formats. One is national format and other is international. Unfortunately CCP does not format phone on its own. It uses Google's phone number lib to format that and that's what we get.

SardarkhanStella commented 1 year ago

So how can I achieve this? Because its a requirement.

hbb20 commented 1 year ago

Do you only support US number or other countries as well?

On Wed, May 24, 2023, 07:59 Sardar Khan @.***> wrote:

So how can I achieve this? Because its a requirement.

— Reply to this email directly, view it on GitHub https://github.com/hbb20/CountryCodePickerProject/issues/577#issuecomment-1561217396, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFQ32DRPYRWXYKDOJB26CTXHYH45ANCNFSM6AAAAAAYL4XBJY . You are receiving this because you were mentioned.Message ID: @.***>

SardarkhanStella commented 1 year ago

Other countries as well.

SardarkhanStella commented 1 year ago

@hbb20 any update on this?

hbb20 commented 1 year ago

No updates yet. Since library it self does not do formatting. It uses Google Phone number library to format the number, library has little control over it.

On Mon, May 29, 2023, 00:58 Sardar Khan @.***> wrote:

@hbb20 https://github.com/hbb20 any update on this?

— Reply to this email directly, view it on GitHub https://github.com/hbb20/CountryCodePickerProject/issues/577#issuecomment-1566649856, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFQ32FITWHTAJXVZ3HERBTXIRCJPANCNFSM6AAAAAAYL4XBJY . You are receiving this because you were mentioned.Message ID: @.***>

SardarkhanStella commented 1 year ago

@hbb20 can you suggest to me how to achieve this using this library?