Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime error with context.launchCountry { } #36

Closed
Dave181295 opened this issue Jul 31, 2021 · 18 comments
Closed

Runtime error with context.launchCountry { } #36

Dave181295 opened this issue Jul 31, 2021 · 18 comments

Comments

@Dave181295
Copy link

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

@Dave181295
Copy link
Author

It's coming from here

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

@github-actions
Copy link

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

@hbb20
Copy link
Owner

hbb20 commented Jul 31, 2021

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

@Dave181295
Copy link
Author

Thanks sir !

@Dave181295
Copy link
Author

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

@hbb20
Copy link
Owner

hbb20 commented Jul 31, 2021

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
Copy link
Owner

hbb20 commented Jul 31, 2021

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

@Dave181295
Copy link
Author

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
Copy link
Owner

hbb20 commented Jul 31, 2021

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
Copy link
Author

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

@hbb20
Copy link
Owner

hbb20 commented Jul 31, 2021

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
Copy link
Author

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

@Dave181295
Copy link
Author

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

@hbb20
Copy link
Owner

hbb20 commented Jul 31, 2021

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
Copy link
Owner

hbb20 commented Jul 31, 2021

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

@Dave181295
Copy link
Author

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
Copy link
Owner

hbb20 commented Jul 31, 2021

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
Copy link
Owner

hbb20 commented Jul 31, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants