CountryCodePicker

Additional

Language
Java
Version
N/A
Created
Mar 21, 2015
Updated
Dec 28, 2017 (Retired)
Owner
Chathura Wijesinghe (chathudan)
Contributors
Chathura Wijesinghe (chathudan)
Huqiu Liao (liaohuqiu)
bryant1410
vannenc
4
Activity
Badge
Generate
Download
Source code
APK file

Show card

CountryCodePicker

CountryCodePicker will help users to

  1. Search and select Country
  2. Get selected country's name,code,currency and dial code (Sri Lanka,LK,LKR,+94)

Download the CountryCodePicker Example APK

Usage

CountryCodePicker on own layout
FragmentManager manager = getSupportFragmentManager();
FragmentTransaction transaction = manager.beginTransaction();

CountryPicker picker = new CountryPicker();

transaction.replace(R.id.home, picker);
transaction.commit();
CountryCodePicker as Android Dialog
 CountryPicker picker = CountryPicker.newInstance("SelectCountry");
 picker.show(getSupportFragmentManager(), "COUNTRY_CODE_PICKER");
CountryPickerListener to get selected country's details
picker.setListener(new CountryPickerListener() {
    @Override
    public void onSelectCountry(String name, String code, String dialCode) {
    }
});

License

CountryCodePicker is released under the Apache License Version 2.0.