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.52k stars 505 forks source link

PhoneNumberValidityChangeListener not called when navigate back #421

Open djardon opened 4 years ago

djardon commented 4 years ago

When navigate to another Fragment and then go back to phone Country Code selector fragment, not working phone formatter and phoneNumberValidatorChangeListener aren't call ever.

Set both on onViewCreated method:

        layoutMobileFields.etPhoneCountryCode.setPhoneNumberValidityChangeListener
        layoutMobileFields.etPhoneCountryCode.registerCarrierNumberEditText(layoutMobileFields.etPhoneNumber as EditText)
hbb20 commented 4 years ago

This is when you are using a nav graph. One fragment has ccp with phone edit text. This work well until you navigate to next fragment and come back. Did I understand that right?

Can you share a video recording and/or ccp fragment code?

Thanks, Harsh Bhakta

On Tue, Jul 14, 2020 at 09:45 David Jardón Peinado notifications@github.com wrote:

When navigate to another Fragment and then go back to phone Country Code selector fragment, not working phone formatter and phoneNumberValidatorChangeListener aren't call ever.

Set both on onViewCreated method:

    layoutMobileFields.etPhoneCountryCode.setPhoneNumberValidityChangeListener
    layoutMobileFields.etPhoneCountryCode.registerCarrierNumberEditText(layoutMobileFields.etPhoneNumber as EditText)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hbb20/CountryCodePickerProject/issues/421, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFQ32FZE36JEG3GQVMUPV3R3R4S7ANCNFSM4OZUWGPA .