-
-
Notifications
You must be signed in to change notification settings - Fork 135
Sorting
Country Picker allows you to change the order of the counties listed. To sort the list you need to provide the sort type to the builder by calling sortBy()
. Below is a snippet of how to apply sort.
CountryPicker.Builder builder =
new CountryPicker.Builder().with(Context)
.listener(OnCountryPickerListener).sortBy(SORT_TYPE);
We can sort the library in 3 different ways.
As the name suggests this will sort the list in alphabetic order. To apply this sorting technique pass CountryPicker.SORT_BY_NAME
to sortBy()
in the builder.
As the name suggests this will sort the list by ISO. To apply this sorting technique pass CountryPicker.SORT_BY_ISO
to sortBy()
in the builder.
As the name suggests this will sort the list by Dial Code. To apply this sorting technique pass CountryPicker.SORT_BY_DIAL_CODE
to sortBy()
in the builder.
Country Picker is an independent project with ongoing development and support made possible thanks to donations made by these awesome backers. If you'd like to join them, please consider: