hbb20 / AndroidCountryPicker

Android Country Picker is a Kotlin-first, flexible and powerful Android library that allows to integrate Country Picker with just a few lines.
MIT License
102 stars 29 forks source link

Runtime error with context.launchCountry { } #36

Closed Dave181295 closed 3 years ago

Dave181295 commented 3 years ago

Cannot access class 'com.hbb20.contrypicker.flagprovider.CPFlagProvider'. Check your module classpath for missing or conflicting dependencies

Dave181295 commented 3 years ago

It's coming from here

cpFlagProvider: [ERROR : com.hbb20.contrypicker.flagprovider.CPFlagProvider]?,

github-actions[bot] commented 3 years ago

I will look into this as soon as I get some time. If it's critical, please contact harshbbhakta@gmail.com

hbb20 commented 3 years ago

Please use v0.0.3. There are something I need to fix for flag provider

Dave181295 commented 3 years ago

Thanks sir !

Dave181295 commented 3 years ago

So for now, I can't use the flags ? so dialog is showing with only text..

hbb20 commented 3 years ago

For now you can use emoji flags and if you have your own flag images then you can also pass that. I am in process of providing other flag packs to set different flag images (as different library) without increasing default library size.

hbb20 commented 3 years ago

0.0.3 should work just fine with default emoji flags as shown in samples of documentation.

Dave181295 commented 3 years ago

Hmm... I'm trying

requireContext().launchCountryPickerDialog( customMasterCountries = "HE,RU,EN,FR", "", CPFileReader, false, null, null, { country -> country.name }, null, null, null, CPDialogConfig.defaultCPDialogViewIds, allowSearch = false, allowClearSelection = false, showTitle = true, showFullScreen = false, ) { cpCountry ->

But there is no flags friend..

hbb20 commented 3 years ago

You are passing 6th param (which is for flag provider) as null that tells to remove all flags.

Either pass CPRowConfig.defaultFlagProvider (which is default emoji flag provider) as 6th argument or ideally pass only named argument of params that you want to override. Library will provider defaults for other.

Dave181295 commented 3 years ago

Thanks , where can I see the languages your library support?

hbb20 commented 3 years ago

This library only support two languages as of now. English and Gujarati. I have other translations available but need some help to get other message translations. Are you in need of some specific language?

image
Dave181295 commented 3 years ago

By the way can you add a property for the country.language ? like English,French,etc.. Thanks a lot !

Dave181295 commented 3 years ago

No worries, where can I find the strings to override these ?

hbb20 commented 3 years ago

These two files contains all the strings resources. You can override as you need. https://github.com/hbb20/AndroidCountryPicker/tree/develop/countrypicker/src/main/res/values-en

hbb20 commented 3 years ago

Can you please explain what is your use case with country.language?

Dave181295 commented 3 years ago

I'm using your library for my traduction's app. so it's more important to me to get the language + the country but that not really a big problem so all is okay :)

hbb20 commented 3 years ago

yeah.. I want to make it wrap content but haven't finalized when should it be wrap_content. Hopefully that will be fixed soon.

hbb20 commented 3 years ago

@Dave181295 , v0.0.6 has wrapping functionality. Let me know if that works for you.