vikktorn / ExampleCountryPicker

Android Country, State/Region, City picker
9 stars 4 forks source link

Can i pick country and city without state? #6

Open london-tokyo opened 4 years ago

london-tokyo commented 4 years ago

When i tap to "Pick country" (for example) i call - countryPicker?.showDialog(supportFragmentManager) Than i tap to "Pick city" (for example) i call: cityPicker?.showDialog(supportFragmentManager)

And i have this issue: java.lang.IllegalArgumentException: No Cities Found! Did you call build()

This is my onCreate{ override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) countryPicker = CountryPicker.Builder().with(this).listener(this).build() cityPicker = CityPicker.Builder().with(this).listener(this).build() }

vikktorn commented 4 years ago

JSON of cities is not completed so sometimes happens that for some countries or states there is no equivalent city and than you have exception. I don't have time to complete JSON files with all data. If you have time you can update JSONs with data that you need but you have to pay attention to put right ID.

Viktor Nesic

On Mon, Jan 20, 2020, 4:15 PM BlackDev notifications@github.com wrote:

When i tap to "Pick country" (for example) i call - countryPicker?.showDialog(supportFragmentManager) Than i tap to "Pick city" (for example) i call: cityPicker?.showDialog(supportFragmentManager)

And i have this issue: java.lang.IllegalArgumentException: No Cities Found! Did you call build()

This is my onCreate{ override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) countryPicker = CountryPicker.Builder().with(this).listener(this).build() cityPicker = CityPicker.Builder().with(this).listener(this).build() }

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vikktorn/ExampleCountryPicker/issues/6?email_source=notifications&email_token=AD3LL6UMBYKSIJABE6KJ6D3Q6W5XRA5CNFSM4KJFZ2J2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IHMLTFA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3LL6UU73NWPWTWDHKTBY3Q6W5XRANCNFSM4KJFZ2JQ .