Skip to content

Searching

Mukesh Solanki edited this page Sep 1, 2018 · 1 revision

The library already provides the mechanism for searching and is enabled by default. To toggle the searching you need to call canSearch() on the builder. Below is a code snippet of how you can toggle it.

CountryPicker.Builder builder =
        new CountryPicker.Builder().with(Context)
            .listener(OnCountryPickerListener).canSearch(false);

You can even change the search icon in the library and replace it will a custom icon. You can learn more about it in Styling