country-picker-android icon indicating copy to clipboard operation
country-picker-android copied to clipboard

How we can set default Country in my app any idea ??

Open visionfaysal opened this issue 4 years ago • 3 comments

i have issue when app is run US +1 country show automatically how i can remove it and set my own selected country as a default ?

visionfaysal avatar Jun 17 '20 08:06 visionfaysal

can you provide some more details? It does not set anything by default. A sample app should help debug the issue

mukeshsolanki avatar Aug 12 '20 13:08 mukeshsolanki

There is no default selection. Its simply showing the list of countries. If you want to get the country object you want (for ex. India)

  private val picker = CountryPicker.Builder()
        .with(this)
        .listener(this)
        .sortBy(SORT_BY_NAME)
        .build()

then:

val country = picker.getCountryByISO("IN")

and you get the country you want

codex-developers avatar Aug 28 '20 08:08 codex-developers

Hello, how can I show one country on the top? Suppose my requirement is, I need to show the UAE flag at the top of the list. Even before Afghanistan. Is it possible with the library?

dennisrufigill avatar Aug 20 '21 08:08 dennisrufigill