-
-
Notifications
You must be signed in to change notification settings - Fork 509
Custom Master Country List
- If your app expects users from only few countries then you might wish to remove all other countries from selection list.
-
You can remove unnecessary countries by setting your custom master country list.
-
Also it will keep user from selecting irrelevant country.
-
Countries of preference will be listed at top in selection dialog. It is helpful when target audience is from a set of countries.
-
Custom master list will only limit the visibility of irrelevant countries from selection dialog. But all other functions like setCountryForCodeName() or setFullNumber() will consider all the countries.
-
Preferred country list will be a subset of custom master list. If some xyz country is not in custom master list, it won't be added to preferred country list.
-
-
add app:ccp_customMasterCountries="US,IN,NZ,BD,PL,RO,ZW" (replace "US,IN,NZ,BD,PL,RO,ZW" by your own country code names) to xml layout. Refer List of countries for name codes.
<com.hbb20.CountryCodePicker android:id="@+id/ccp" android:layout_width="wrap_content" android:layout_height="wrap_content" app:ccp_customMasterCountries="US,IN,NZ,BD,PL,RO,ZW" />
-
-
- Use
setCustomMasterCountries()
method. -
setCustomMasterCountries(null);
will remove custom list and revert to library default list.
- Use
-
- How to Integrate into your project
- Full Number Support
- Use as a Country Selector
- Auto detect country
- Auto detect language
- Remember last selection
- Country Preference
- Custom Mater List
- Exclude Countries
- Example phonenumber as hint
- Multi Language Support
- Default Country
- Country Selection Listener
- Dialog events listener
- CCP Theme Customization
- CCP Dialog Theme Customization
- Custom TypeFace
- Read Selected Country
- XML Properties
- Update Guide to v2
- Guide to Add New Language Support
- Guide to add New Country
- Change contry names for local project
- Handle CCP ClickListener Manually
- Custom Dialog Title/Hint/Empty Result ACK
- Flag Emoji Support (BETA)
- Change Log