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
Issue when selecting a country while registering EditText #30
When you register EditText and try to select a country then validate the phone number, it always evaluates to false.
After debugging, i found that after selecting a country, the mRegisteredPhoneNumberTextView points to selected_country_tv not the registered EditText.
As a result, an exception, NumberParseException, occurs internally in getPhoneNumber() as the string is a code like this "+999".
Workaround: before calling `isValid(), i register the EditText.
When you register EditText and try to select a country then validate the phone number, it always evaluates to false. After debugging, i found that after selecting a country, the
mRegisteredPhoneNumberTextView
points toselected_country_tv
not the registered EditText. As a result, an exception, NumberParseException, occurs internally ingetPhoneNumber()
as the string is a code like this "+999".Workaround: before calling `isValid(), i register the EditText.