mukeshsolanki / country-picker-android

A simple library that displays a beautiful list of all the countries allowing the user to pick the country he wishes and provide details like country code, iso code name,currency and flag.
MIT License
321 stars 135 forks source link

Keyboard doesn't close on back screen if country selected after searching from dialog fragment (fine in bottom sheet) #90

Closed surbhi-jungleworks closed 4 years ago

surbhi-jungleworks commented 4 years ago

Subject of the issue

Describe your issue here.

Steps to reproduce

Tell us how to reproduce this issue. Please provide a working demo.

Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead

gauravsoni020 commented 4 years ago

Just Use the below code to hide the keyboard inside listner

           ` CountryPicker.Builder builder = new CountryPicker.Builder().with(this)
                    .listener(new OnCountryPickerListener() {
                        @Override
                        public void onSelectCountry(Country country) {
                            countryCodeTv.setText(country.getDialCode());
                            getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
                        }
                    });

`

surbhi-jungleworks commented 4 years ago

Yes, that i have already handled at my end because it's already too late