joielechong / CountryCodePicker

Country Code Picker (CCP) is an android library which provides an easy way to search and select country phone code ( national code ) for the telephone number.
Apache License 2.0
317 stars 144 forks source link

setCountryForPhoneCode does not set the countryCode to the desired countryCode #76

Open ankur-1989 opened 4 years ago

ankur-1989 commented 4 years ago

I am performing the following steps:

  1. I have a button which opens a dialog and allows me to select the language or country.
  2. On selection of a particular country, I set the country code in a textView on the calling activity. (It recreate the activity as changing the locale settings of app.)
  3. onTextChangeListener, I set the country code in Country Code picker, but it always takes the default one instead of setting the desired one. Is there something wrong here?
isabsent commented 4 years ago

"setDefaultCountryUsingNameCode() or setDefaultCountryUsingPhoneCode() will not set default country as selected country in CCP view. To set default country as selected country in CCP view, call resetToDefaultCountry() method."