Skip to content

Exclude specific countries

Harsh Bhakta edited this page Jan 30, 2018 · 1 revision

Sometimes you want to remove some specific country from the list because of business requirement. With this feature, you can remove those specific countries from library's master list.

   <com.hbb20.CountryCodePicker
   android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   app:ccp_excludedCountries="in,us,pk" />

For example, the above code will exclude India (in), United States (us) and Pakistan (pk) from the library's master list. Programmatically it can be set using ccp.setExcludedCountries("in,us,pk").

Note: app:ccp_customMasterCountries has higher priority than app:ccp_excludedCountries so if your ccp uses custom master list of countries, then this will be ignored.

Clone this wiki locally