Android - 城市/单项/国家区号选择器基础使用 及 使用国际区号json文件

1. citypickerview的城市选择器:

Github:https://github.com/androidzhangjin/citypicker

  1. 添加依赖
implementation 'liji.library.dev:citypickerview:5.2.2'
  1. 初始化选择器
private CityPickerView cityPickerView;
@Override
    protected void onCreate(Bundle savedInstanceState) {
    
    
   		 cityPickerView = new CityPickerView();
        cityPickerView.init(this);
    }
  1. 设置参数
//设置默认地址:从服务器拿的设置过的地址
String[] addressSplit = receivingAddress.getAddress().split("-");
CityConfig cityConfig = new CityConfig.Builder()
		.cancelTextSize(14)
		.confirmTextSize(14)
		.title("地址选择")
		.titleBackgroundColor(IS_NIGHT_MODE ? "#1E212D" : "#FFFFFF")
		.titleTextColor(IS_NIGHT_MODE ? "#8597A5" : "#696969")
		.confirTextColor(IS_NIGHT_MODE ? "#8597A5" : "#696969")
		.cancelTextColor(IS_NIGHT_MODE ? "#8597A5" : "#696969")
		.provinceCyclic(true)
		.cityCyclic(false)
		.districtCyclic(false)
		.visibleItemsCount(7)
		.province(addressSplit[0])
		.city(addressSplit[1])
		.district(addressSplit[2])
		.build();
cityPickerView.setConfig(cityConfig);
cityPickerView.setOnCityItemClickListener(new OnCityItemClickListener() {
    
    
	@Override
	public void onSelected(ProvinceBean province, CityBean city, DistrictBean district) {
    
    
		super.onSelected(province, city, district);
		tvAddress.setText(province + "-" + city + "-" + district);
	});  
  1. 点击显示选择器
 public void onClickView(View view) {
    
    
	 KeyboardUtil.hideSoftKeyboard(this);
	 if (cityPickerView != null) {
    
    
	 	cityPickerView.showCityPicker();
	 }
 }

2. Android-PickerView的单项选择器

GitHub:https://github.com/Bigkoo/Android-PickerView 也有时间选择器
导入依赖:

implementation 'com.contrarywind:Android-PickerView:3.2.7'
		tvCountry.setOnClickListener(view -> {
    
    
            if(!pvOptions.isShowing()){
    
    
                pvOptions.setPicker(bankNameList);
                pvOptions.show();
            }
        });

        pvOptions = new OptionsPickerView.Builder(this, new OptionsPickerView.OnOptionsSelectListener() {
    
    
            @Override
            public void onOptionsSelect(int options1, int options2, int options3, View v) {
    
    
                String[] select = bankNameList.get(options1).split(" ");
                tvCountry.setText("+"+select[0]);
            }
        }).setSubmitText(getString(R.string.confirm))
                .setCancelText(getString(R.string.cancel))
                .setTitleText("")//标题
                .setSubCalSize(15)//确定和取消文字大小
                .setContentTextSize(15)//滚轮文字大小
                .setTitleSize(16)//标题文字大小
                .setTitleColor(getResources().getColor(R.color.text_black))//标题文字颜色
                .setSubmitColor(getResources().getColor(R.color.red_dc3c23))//确定按钮文字颜色
                .setCancelColor(getResources().getColor(R.color.text_black))//取消按钮文字颜色
                .setTextColorOut(getResources().getColor(R.color.text_black))
                .setTitleBgColor(getResources().getColor(R.color.white))//标题背景颜色 Night mode
                .setTextColorCenter(getResources().getColor(R.color.red_dc3c23))
                .setBgColor(getResources().getColor(R.color.white))//滚轮背景颜色 Night mode
                .isCenterLabel(false) //是否只显示中间选中项的label文字,false则每项item全部都带有label。
                .setSelectOptions(5)  //设置默认选中项
                .setOutSideCancelable(false)//点击外部dismiss default true
                .isDialog(false)//是否显示为对话框样式
                .build();

3. CountryCodePicker国家区号选择器

Github:https://github.com/joielechong/CountryCodePicker

implementation 'com.hbb20:ccp:2.6.1'
<com.hbb20.CountryCodePicker
    android:id="@+id/ccp"
    android:layout_width="match_parent"
    android:layout_height="45dp"
    app:ccp_textGravity="LEFT"
    android:gravity="center_vertical"
    android:paddingLeft="5dp"
    app:ccpDialog_background="@color/white"
    app:ccpDialog_cornerRadius="15dp"
    app:ccpDialog_showCloseIcon="true"
    app:ccpDialog_showFlag="true"
    app:ccpDialog_showPhoneCode="true"
    app:ccp_arrowColor="@color/white"
    app:ccp_contentColor="@color/text_black"
    app:ccp_defaultNameCode="SG" 
    app:ccp_showFullName="true"
    app:ccp_showPhoneCode="false"
    app:ccp_textSize="15sp" />
//获取选择的区号
ccp.setOnCountryChangeListener(() ->{
    
    
  	tvArea.setText(ccp.getSelectedCountryCode());
});
//        ccp.registerCarrierNumberEditText(tvArea);

4. 使用国际区号json文件(与3无关)

  1. 添加依赖
 implementation 'com.google.code.gson:gson:2.8.6'
  1. 将area.json导入到assets下
{
    
    
  "data": [
    {
    
    
      "shortName": "AD",
      "name": "安道尔共和国",
      "en": "Andorra",
      "tel": "376",
      "pinyin": "adeghg"
    },....
    完整版在下面
  1. 实体类
public class AreasModel {
    
    
    private List<CountryModel> data;

    public void setData(List<CountryModel> data) {
    
    
        this.data = data;
    }

    public List<CountryModel> getData() {
    
    
        return this.data;
    }

    public class CountryModel {
    
    
        public String name; //名字
        public String shortName; //首字母
        public String tel; //编号
        public String en;
        public String pinyin;
}
  1. 读取json转换成列表
private void initView(){
    
    
        String json = getJsonData(this, "area.json");
        AreasModel areasModel = new Gson().fromJson(json, AreasModel.class);
        countryList = (ArrayList<AreasModel.CountryModel>) areasModel.getData();
}

public static String getJsonData(Context context, String fileName) {
    
    
        StringBuilder stringBuilder = new StringBuilder();
        try {
    
    
            BufferedReader bf = new BufferedReader(new InputStreamReader(
                    context.getResources().getAssets().open(fileName)));
            String line;
            while ((line = bf.readLine()) != null) {
    
    
                stringBuilder.append(line);
            }
        } catch (IOException e) {
    
    
            e.printStackTrace();
        }
        return stringBuilder.toString();
    }

ok 结束,以下是area.json文件:

{
    
    
  "data": [
    {
    
    
      "shortName": "AD",
      "name": "安道尔共和国",
      "en": "Andorra",
      "tel": "376",
      "pinyin": "adeghg"
    },
    {
    
    
      "shortName": "AE",
      "name": "阿拉伯联合酋长国",
      "en": "UnitedArabEmirates",
      "tel": "971",
      "pinyin": "alblhqzg"
    },
    {
    
    
      "shortName": "AF",
      "name": "阿富汗",
      "en": "Afghanistan",
      "tel": "93",
      "pinyin": "afh"
    },
    {
    
    
      "shortName": "AG",
      "name": "安提瓜和巴布达",
      "en": "AntiguaandBarbuda",
      "tel": "1268",
      "pinyin": "atghbbd"
    },
    {
    
    
      "shortName": "AI",
      "name": "安圭拉岛",
      "en": "Anguilla",
      "tel": "1264",
      "pinyin": "agld"
    },
    {
    
    
      "shortName": "AL",
      "name": "阿尔巴尼亚",
      "en": "Albania",
      "tel": "355",
      "pinyin": "aebny"
    },
    {
    
    
      "shortName": "AM",
      "name": "阿美尼亚",
      "en": "Armenia",
      "tel": "374",
      "pinyin": "amny"
    },
    {
    
    
      "shortName": "",
      "name": "阿森松",
      "en": "Ascension",
      "tel": "247",
      "pinyin": "als"

    },
    {
    
    
      "shortName": "AO",
      "name": "安哥拉",
      "en": "Angola",
      "tel": "244",
      "pinyin": "agl"

    },
    {
    
    
      "shortName": "AR",
      "name": "阿根廷",
      "en": "Argentina",
      "tel": "54",
      "pinyin": "agt"

    },
    {
    
    
      "shortName": "AT",
      "name": "奥地利",
      "en": "Austria",
      "tel": "43",
      "pinyin": "adl"

    },
    {
    
    
      "shortName": "AU",
      "name": "澳大利亚",
      "en": "Australia",
      "tel": "61",
      "pinyin": "adly"

    },
    {
    
    
      "shortName": "AZ",
      "name": "阿塞拜疆",
      "en": "Azerbaijan",
      "tel": "994",
      "pinyin": "asbj"

    },
    {
    
    
      "shortName": "BB",
      "name": "巴巴多斯",
      "en": "Barbados",
      "tel": "1246",
      "pinyin": "bbds"

    },
    {
    
    
      "shortName": "BD",
      "name": "孟加拉国",
      "en": "Bangladesh",
      "tel": "880",
      "pinyin": "mjlg"

    },
    {
    
    
      "shortName": "BE",
      "name": "比利时",
      "en": "Belgium",
      "tel": "32",
      "pinyin": "bls"

    },
    {
    
    
      "shortName": "BF",
      "name": "布基纳法索",
      "en": "Burkina-faso",
      "tel": "226",
      "pinyin": "bjnfs"

    },
    {
    
    
      "shortName": "BG",
      "name": "保加利亚",
      "en": "Bulgaria",
      "tel": "359",
      "pinyin": "bjly"

    },
    {
    
    
      "shortName": "BH",
      "name": "巴林",
      "en": "Bahrain",
      "tel": "973",
      "pinyin": "bl"

    },
    {
    
    
      "shortName": "BI",
      "name": "布隆迪",
      "en": "Burundi",
      "tel": "257",
      "pinyin": "bld"

    },
    {
    
    
      "shortName": "BJ",
      "name": "贝宁",
      "en": "Benin",
      "tel": "229",
      "pinyin": "bl"

    },
    {
    
    
      "shortName": "BL",
      "name": "巴勒斯坦",
      "en": "Palestine",
      "tel": "970",
      "pinyin": "blst"

    },
    {
    
    
      "shortName": "BM",
      "name": "百慕大群岛",
      "en": "BermudaIs.",
      "tel": "1441",
      "pinyin": "bmdqd"

    },
    {
    
    
      "shortName": "BN",
      "name": "文莱",
      "en": "Brunei",
      "tel": "673",
      "pinyin": "wl"

    },
    {
    
    
      "shortName": "BO",
      "name": "玻利维亚",
      "en": "Bolivia",
      "tel": "591",
      "pinyin": "blwy"

    },
    {
    
    
      "shortName": "BR",
      "name": "巴西",
      "en": "Brazil",
      "tel": "55",
      "pinyin": "bx"

    },
    {
    
    
      "shortName": "BS",
      "name": "巴哈马",
      "en": "Bahamas",
      "tel": "1242",
      "pinyin": "bhm"

    },
    {
    
    
      "shortName": "BW",
      "name": "博茨瓦纳",
      "en": "Botswana",
      "tel": "267",
      "pinyin": "bcwn"

    },
    {
    
    
      "shortName": "BY",
      "name": "白俄罗斯",
      "en": "Belarus",
      "tel": "375",
      "pinyin": "bels"

    },
    {
    
    
      "shortName": "BZ",
      "name": "伯利兹",
      "en": "Belize",
      "tel": "501",
      "pinyin": "blz"

    },
    {
    
    
      "shortName": "CA",
      "name": "加拿大",
      "en": "Canada",
      "tel": "1",
      "pinyin": "jnd"

    },
    {
    
    
      "shortName": "",
      "name": "开曼群岛",
      "en": "CaymanIs.",
      "tel": "1345",
      "pinyin": "kmqd"

    },
    {
    
    
      "shortName": "CF",
      "name": "中非共和国",
      "en": "CentralAfricanRepublic",
      "tel": "236",
      "pinyin": "zfghg"

    },
    {
    
    
      "shortName": "CG",
      "name": "刚果",
      "en": "Congo",
      "tel": "242",
      "pinyin": "gg"

    },
    {
    
    
      "shortName": "CH",
      "name": "瑞士",
      "en": "Switzerland",
      "tel": "41",
      "pinyin": "rs"

    },
    {
    
    
      "shortName": "CK",
      "name": "库克群岛",
      "en": "CookIs.",
      "tel": "682",
      "pinyin": "kkqd"

    },
    {
    
    
      "shortName": "CL",
      "name": "智利",
      "en": "Chile",
      "tel": "56",
      "pinyin": "zl"

    },
    {
    
    
      "shortName": "CM",
      "name": "喀麦隆",
      "en": "Cameroon",
      "tel": "237",
      "pinyin": "kml"

    },
    {
    
    
      "shortName": "CN",
      "name": "中国",
      "en": "China",
      "tel": "86",
      "pinyin": "zg"

    },
    {
    
    
      "shortName": "CO",
      "name": "哥伦比亚",
      "en": "Colombia",
      "tel": "57",
      "pinyin": "glby"

    },
    {
    
    
      "shortName": "CR",
      "name": "哥斯达黎加",
      "en": "CostaRica",
      "tel": "506",
      "pinyin": "gsdlj"

    },
    {
    
    
      "shortName": "CS",
      "name": "捷克",
      "en": "Czech",
      "tel": "420",
      "pinyin": "jk"

    },
    {
    
    
      "shortName": "CU",
      "name": "古巴",
      "en": "Cuba",
      "tel": "53",
      "pinyin": "gb"

    },
    {
    
    
      "shortName": "CY",
      "name": "塞浦路斯",
      "en": "Cyprus",
      "tel": "357",
      "pinyin": "spls"

    },
    {
    
    
      "shortName": "CZ",
      "name": "捷克",
      "en": "CzechRepublic",
      "tel": "420",
      "pinyin": "jk"

    },
    {
    
    
      "shortName": "DE",
      "name": "德国",
      "en": "Germany",
      "tel": "49",
      "pinyin": "dg"

    },
    {
    
    
      "shortName": "DJ",
      "name": "吉布提",
      "en": "Djibouti",
      "tel": "253",
      "pinyin": "jbt"

    },
    {
    
    
      "shortName": "DK",
      "name": "丹麦",
      "en": "Denmark",
      "tel": "45",
      "pinyin": "dm"

    },
    {
    
    
      "shortName": "DO",
      "name": "多米尼加共和国",
      "en": "DominicaRep.",
      "tel": "1890",
      "pinyin": "dmnjghg"

    },
    {
    
    
      "shortName": "DZ",
      "name": "阿尔及利亚",
      "en": "Algeria",
      "tel": "213",
      "pinyin": "aejly"

    },
    {
    
    
      "shortName": "EC",
      "name": "厄瓜多尔",
      "en": "Ecuador",
      "tel": "593",
      "pinyin": "egde"

    },
    {
    
    
      "shortName": "EE",
      "name": "爱沙尼亚",
      "en": "Estonia",
      "tel": "372",
      "pinyin": "asny"

    },
    {
    
    
      "shortName": "EG",
      "name": "埃及",
      "en": "Egypt",
      "tel": "20",
      "pinyin": "ej"

    },
    {
    
    
      "shortName": "ES",
      "name": "西班牙",
      "en": "Spain",
      "tel": "34",
      "pinyin": "xby"

    },
    {
    
    
      "shortName": "ET",
      "name": "埃塞俄比亚",
      "en": "Ethiopia",
      "tel": "251",
      "pinyin": "aseby"

    },
    {
    
    
      "shortName": "FI",
      "name": "芬兰",
      "en": "Finland",
      "tel": "358",
      "pinyin": "fl"

    },
    {
    
    
      "shortName": "FJ",
      "name": "斐济",
      "en": "Fiji",
      "tel": "679",
      "pinyin": "fj"

    },
    {
    
    
      "shortName": "FR",
      "name": "法国",
      "en": "France",
      "tel": "33",
      "pinyin": "fg"

    },
    {
    
    
      "shortName": "GA",
      "name": "加蓬",
      "en": "Gabon",
      "tel": "241",
      "pinyin": "jp"

    },
    {
    
    
      "shortName": "GB",
      "name": "英国",
      "en": "UnitedKiongdom",
      "tel": "44",
      "pinyin": "yg"

    },
    {
    
    
      "shortName": "GD",
      "name": "格林纳达",
      "en": "Grenada",
      "tel": "1809",
      "pinyin": "glnd"

    },
    {
    
    
      "shortName": "GE",
      "name": "格鲁吉亚",
      "en": "Georgia",
      "tel": "995",
      "pinyin": "gljy"

    },
    {
    
    
      "shortName": "GF",
      "name": "法属圭亚那",
      "en": "FrenchGuiana",
      "tel": "594",
      "pinyin": "fsgyn"

    },
    {
    
    
      "shortName": "GH",
      "name": "加纳",
      "en": "Ghana",
      "tel": "233",
      "pinyin": "jn"

    },
    {
    
    
      "shortName": "GI",
      "name": "直布罗陀",
      "en": "Gibraltar",
      "tel": "350",
      "pinyin": "zblt"

    },
    {
    
    
      "shortName": "GM",
      "name": "冈比亚",
      "en": "Gambia",
      "tel": "220",
      "pinyin": "gby"

    },
    {
    
    
      "shortName": "GN",
      "name": "几内亚",
      "en": "Guinea",
      "tel": "224",
      "pinyin": "jny"

    },
    {
    
    
      "shortName": "GR",
      "name": "希腊",
      "en": "Greece",
      "tel": "30",
      "pinyin": "xl"

    },
    {
    
    
      "shortName": "GT",
      "name": "危地马拉",
      "en": "Guatemala",
      "tel": "502",
      "pinyin": "wdml"

    },
    {
    
    
      "shortName": "GU",
      "name": "关岛",
      "en": "Guam",
      "tel": "1671",
      "pinyin": "gd"

    },
    {
    
    
      "shortName": "GY",
      "name": "圭亚那",
      "en": "Guyana",
      "tel": "592",
      "pinyin": "gyn"

    },
    {
    
    
      "shortName": "HK",
      "name": "香港(中国)",
      "en": "Hongkong",
      "tel": "852",
      "pinyin": "xgzg"

    },
    {
    
    
      "shortName": "HN",
      "name": "洪都拉斯",
      "en": "Honduras",
      "tel": "504",
      "pinyin": "hdls"

    },
    {
    
    
      "shortName": "HT",
      "name": "海地",
      "en": "Haiti",
      "tel": "509",
      "pinyin": "hd"

    },
    {
    
    
      "shortName": "HU",
      "name": "匈牙利",
      "en": "Hungary",
      "tel": "36",
      "pinyin": "xyl"

    },
    {
    
    
      "shortName": "ID",
      "name": "印度尼西亚",
      "en": "Indonesia",
      "tel": "62",
      "pinyin": "ydnxy"

    },
    {
    
    
      "shortName": "IE",
      "name": "爱尔兰",
      "en": "Ireland",
      "tel": "353",
      "pinyin": "ael"

    },
    {
    
    
      "shortName": "IL",
      "name": "以色列",
      "en": "Israel",
      "tel": "972",
      "pinyin": "ysl"

    },
    {
    
    
      "shortName": "IN",
      "name": "印度",
      "en": "India",
      "tel": "91",
      "pinyin": "yd"

    },
    {
    
    
      "shortName": "IQ",
      "name": "伊拉克",
      "en": "Iraq",
      "tel": "964",
      "pinyin": "ylk"

    },
    {
    
    
      "shortName": "IR",
      "name": "伊朗",
      "en": "Iran",
      "tel": "98",
      "pinyin": "yl"

    },
    {
    
    
      "shortName": "IS",
      "name": "冰岛",
      "en": "Iceland",
      "tel": "354",
      "pinyin": "bd"

    },
    {
    
    
      "shortName": "IT",
      "name": "意大利",
      "en": "Italy",
      "tel": "39",
      "pinyin": "ydl"

    },
    {
    
    
      "shortName": "",
      "name": "科特迪瓦",
      "en": "IvoryCoast",
      "tel": "225",
      "pinyin": "ktdw"

    },
    {
    
    
      "shortName": "JM",
      "name": "牙买加",
      "en": "Jamaica",
      "tel": "1876",
      "pinyin": "ymj"

    },
    {
    
    
      "shortName": "JO",
      "name": "约旦",
      "en": "Jordan",
      "tel": "962",
      "pinyin": "yd"

    },
    {
    
    
      "shortName": "JP",
      "name": "日本",
      "en": "Japan",
      "tel": "81",
      "pinyin": "rb"

    },
    {
    
    
      "shortName": "KE",
      "name": "肯尼亚",
      "en": "Kenya",
      "tel": "254",
      "pinyin": "kny"

    },
    {
    
    
      "shortName": "KG",
      "name": "吉尔吉斯坦",
      "en": "Kyrgyzstan",
      "tel": "331",
      "pinyin": "jejst"

    },
    {
    
    
      "shortName": "KH",
      "name": "柬埔寨",
      "en": "Kampuchea(Cambodia)",
      "tel": "855",
      "pinyin": "jpz"

    },
    {
    
    
      "shortName": "KP",
      "name": "朝鲜",
      "en": "NorthKorea",
      "tel": "850",
      "pinyin": "cx"

    },
    {
    
    
      "shortName": "KR",
      "name": "韩国",
      "en": "Korea",
      "tel": "82",
      "pinyin": "hg"


    },
    {
    
    
      "shortName": "KT",
      "name": "科特迪瓦共和国",
      "en": "RepublicofIvoryCoast",
      "tel": "225",
      "pinyin": "ktdwghg"

    },
    {
    
    
      "shortName": "KW",
      "name": "科威特",
      "en": "Kuwait",
      "tel": "965",
      "pinyin": "kwt"

    },
    {
    
    
      "shortName": "KZ",
      "name": "哈萨克斯坦",
      "en": "Kazakstan",
      "tel": "327",
      "pinyin": "hskst"

    },
    {
    
    
      "shortName": "LA",
      "name": "老挝",
      "en": "Laos",
      "tel": "856",
      "pinyin": "lw"

    },
    {
    
    
      "shortName": "LB",
      "name": "黎巴嫩",
      "en": "Lebanon",
      "tel": "961",
      "pinyin": "lbn"

    },
    {
    
    
      "shortName": "LC",
      "name": "圣卢西亚",
      "en": "St.Lucia",
      "tel": "1758",
      "pinyin": "slxy"

    },
    {
    
    
      "shortName": "LI",
      "name": "列支敦士登",
      "en": "Liechtenstein",
      "tel": "423",
      "pinyin": "lzdsd"

    },
    {
    
    
      "shortName": "LK",
      "name": "斯里兰卡",
      "en": "SriLanka",
      "tel": "94",
      "pinyin": "sllk"

    },
    {
    
    
      "shortName": "LR",
      "name": "利比里亚",
      "en": "Liberia",
      "tel": "231",
      "pinyin": "lbly"

    },
    {
    
    
      "shortName": "LS",
      "name": "莱索托",
      "en": "Lesotho",
      "tel": "266",
      "pinyin": "lst"

    },
    {
    
    
      "shortName": "LT",
      "name": "立陶宛",
      "en": "Lithuania",
      "tel": "370",
      "pinyin": "ltw"

    },
    {
    
    
      "shortName": "LU",
      "name": "卢森堡",
      "en": "Luxembourg",
      "tel": "352",
      "pinyin": "lsb"

    },
    {
    
    
      "shortName": "LV",
      "name": "拉脱维亚",
      "en": "Latvia",
      "tel": "371",
      "pinyin": "ltwy"

    },
    {
    
    
      "shortName": "LY",
      "name": "利比亚",
      "en": "Libya",
      "tel": "218",
      "pinyin": "lby"

    },
    {
    
    
      "shortName": "MA",
      "name": "摩洛哥",
      "en": "Morocco",
      "tel": "212",
      "pinyin": "mlg"

    },
    {
    
    
      "shortName": "MC",
      "name": "摩纳哥",
      "en": "Monaco",
      "tel": "377",
      "pinyin": "mng"

    },
    {
    
    
      "shortName": "MD",
      "name": "摩尔多瓦",
      "en": "Moldova,Republicof",
      "tel": "373",
      "pinyin": "medw"

    },
    {
    
    
      "shortName": "MG",
      "name": "马达加斯加",
      "en": "Madagascar",
      "tel": "261",
      "pinyin": "mdjsj"

    },
    {
    
    
      "shortName": "ML",
      "name": "马里",
      "en": "Mali",
      "tel": "223",
      "pinyin": "ml"

    },
    {
    
    
      "shortName": "MM",
      "name": "缅甸",
      "en": "Burma",
      "tel": "95",
      "pinyin": "md"

    },
    {
    
    
      "shortName": "MN",
      "name": "蒙古",
      "en": "Mongolia",
      "tel": "976",
      "pinyin": "mg"

    },
    {
    
    
      "shortName": "MO",
      "name": "澳门(中国)",
      "en": "Macao",
      "tel": "853",
      "pinyin": "am zg"

    },
    {
    
    
      "shortName": "MS",
      "name": "蒙特塞拉特岛",
      "en": "MontserratIs",
      "tel": "1664",
      "pinyin": "mtsstd"

    },
    {
    
    
      "shortName": "MT",
      "name": "马耳他",
      "en": "Malta",
      "tel": "356",
      "pinyin": "met"

    },
    {
    
    
      "shortName": "",
      "name": "马里亚那群岛",
      "en": "MarianaIs",
      "tel": "1670",
      "pinyin": "mlynqd"

    },
    {
    
    
      "shortName": "",
      "name": "马提尼克",
      "en": "Martinique",
      "tel": "596",
      "pinyin": "mtnk"

    },
    {
    
    
      "shortName": "MU",
      "name": "毛里求斯",
      "en": "Mauritius",
      "tel": "230",
      "pinyin": "mlqs"

    },
    {
    
    
      "shortName": "MV",
      "name": "马尔代夫",
      "en": "Maldives",
      "tel": "960",
      "pinyin": "medf"


    },
    {
    
    
      "shortName": "MW",
      "name": "马拉维",
      "en": "Malawi",
      "tel": "265",
      "pinyin": "mlw"

    },
    {
    
    
      "shortName": "MX",
      "name": "墨西哥",
      "en": "Mexico",
      "tel": "52",
      "pinyin": "mxg"

    },
    {
    
    
      "shortName": "MY",
      "name": "马来西亚",
      "en": "Malaysia",
      "tel": "60",
      "pinyin": "mlxy"

    },
    {
    
    
      "shortName": "MZ",
      "name": "莫桑比克",
      "en": "Mozambique",
      "tel": "258",
      "pinyin": "msbk"

    },
    {
    
    
      "shortName": "NA",
      "name": "纳米比亚",
      "en": "Namibia",
      "tel": "264",
      "pinyin": "nmby"

    },
    {
    
    
      "shortName": "NE",
      "name": "尼日尔",
      "en": "Niger",
      "tel": "977",
      "pinyin": "nre"

    },
    {
    
    
      "shortName": "NG",
      "name": "尼日利亚",
      "en": "Nigeria",
      "tel": "234",
      "pinyin": "nrly"

    },
    {
    
    
      "shortName": "NI",
      "name": "尼加拉瓜",
      "en": "Nicaragua",
      "tel": "505",
      "pinyin": "njlg"

    },
    {
    
    
      "shortName": "NL",
      "name": "荷兰",
      "en": "Netherlands",
      "tel": "31",
      "pinyin": "hl"

    },
    {
    
    
      "shortName": "NO",
      "name": "挪威",
      "en": "Norway",
      "tel": "47",
      "pinyin": "nw"

    },
    {
    
    
      "shortName": "NP",
      "name": "尼泊尔",
      "en": "Nepal",
      "tel": "977",
      "pinyin": "nbe"

    },
    {
    
    
      "shortName": "",
      "name": "荷属安的列斯",
      "en": "NetheriandsAntilles",
      "tel": "599",
      "pinyin": "hsadls"

    },
    {
    
    
      "shortName": "NR",
      "name": "瑙鲁",
      "en": "Nauru",
      "tel": "674",
      "pinyin": "nl"

    },
    {
    
    
      "shortName": "NZ",
      "name": "新西兰",
      "en": "NewZealand",
      "tel": "64",
      "pinyin": "xxl"

    },
    {
    
    
      "shortName": "OM",
      "name": "阿曼",
      "en": "Oman",
      "tel": "968",
      "pinyin": "am"

    },
    {
    
    
      "shortName": "PA",
      "name": "巴拿马",
      "en": "Panama",
      "tel": "507",
      "pinyin": "bnm"

    },
    {
    
    
      "shortName": "PE",
      "name": "秘鲁",
      "en": "Peru",
      "tel": "51",
      "pinyin": "bl"

    },
    {
    
    
      "shortName": "PF",
      "name": "法属玻利尼西亚",
      "en": "FrenchPolynesia",
      "tel": "689",
      "pinyin": "fsblnxy"

    },
    {
    
    
      "shortName": "PG",
      "name": "巴布亚新几内亚",
      "en": "PapuaNewCuinea",
      "tel": "675",
      "pinyin": "bbyxjny"

    },
    {
    
    
      "shortName": "PH",
      "name": "菲律宾",
      "en": "Philippines",
      "tel": "63",
      "pinyin": "flb"

    },
    {
    
    
      "shortName": "PK",
      "name": "巴基斯坦",
      "en": "Pakistan",
      "tel": "92",
      "pinyin": "bjst"

    },
    {
    
    
      "shortName": "PL",
      "name": "波兰",
      "en": "Poland",
      "tel": "48",
      "pinyin": "bl"

    },
    {
    
    
      "shortName": "PR",
      "name": "波多黎各",
      "en": "PuertoRico",
      "tel": "1787",
      "pinyin": "bdlg"

    },
    {
    
    
      "shortName": "PT",
      "name": "葡萄牙",
      "en": "Portugal",
      "tel": "351",
      "pinyin": "pty"

    },
    {
    
    
      "shortName": "PY",
      "name": "巴拉圭",
      "en": "Paraguay",
      "tel": "595",
      "pinyin": "blg"

    },
    {
    
    
      "shortName": "QA",
      "name": "卡塔尔",
      "en": "Qatar",
      "tel": "974",
      "pinyin": "kte"

    },
    {
    
    
      "shortName": "",
      "name": "留尼旺",
      "en": "Reunion",
      "tel": "262",
      "pinyin": "lnw"

    },
    {
    
    
      "shortName": "RO",
      "name": "罗马尼亚",
      "en": "Romania",
      "tel": "40",
      "pinyin": "lmny"

    },
    {
    
    
      "shortName": "RU",
      "name": "俄罗斯",
      "en": "Russia",
      "tel": "7",
      "pinyin": "els"

    },
    {
    
    
      "shortName": "SA",
      "name": "沙特阿拉伯",
      "en": "SaudiArabia",
      "tel": "966",
      "pinyin": "stalb"

    },
    {
    
    
      "shortName": "SB",
      "name": "所罗门群岛",
      "en": "SolomonIs",
      "tel": "677",
      "pinyin": "slmqd"

    },
    {
    
    
      "shortName": "SC",
      "name": "塞舌尔",
      "en": "Seychelles",
      "tel": "248",
      "pinyin": "sse"

    },
    {
    
    
      "shortName": "SD",
      "name": "苏丹",
      "en": "Sudan",
      "tel": "249",
      "pinyin": "sd"

    },
    {
    
    
      "shortName": "SE",
      "name": "瑞典",
      "en": "Sweden",
      "tel": "46",
      "pinyin": "rd"

    },
    {
    
    
      "shortName": "SG",
      "name": "新加坡",
      "en": "Singapore",
      "tel": "65",
      "pinyin": "xjp"

    },
    {
    
    
      "shortName": "SI",
      "name": "斯洛文尼亚",
      "en": "Slovenia",
      "tel": "386",
      "pinyin": "slwny"

    },
    {
    
    
      "shortName": "SK",
      "name": "斯洛伐克",
      "en": "Slovakia",
      "tel": "421",
      "pinyin": "slfk"

    },
    {
    
    
      "shortName": "SL",
      "name": "塞拉利昂",
      "en": "SierraLeone",
      "tel": "232",
      "pinyin": "slla"

    },
    {
    
    
      "shortName": "SM",
      "name": "圣马力诺",
      "en": "SanMarino",
      "tel": "378",
      "pinyin": "smln"

    },
    {
    
    
      "shortName": "",
      "name": "东萨摩亚(美)",
      "en": "SamoaEastern",
      "tel": "684",
      "pinyin": "dsmym"

    },
    {
    
    
      "shortName": "",
      "name": "西萨摩亚",
      "en": "SanMarino",
      "tel": "685",
      "pinyin": "xsmy"

    },
    {
    
    
      "shortName": "SN",
      "name": "塞内加尔",
      "en": "Senegal",
      "tel": "221",
      "pinyin": "snje"

    },
    {
    
    
      "shortName": "SO",
      "name": "索马里",
      "en": "Somali",
      "tel": "252",
      "pinyin": "sml"

    },
    {
    
    
      "shortName": "SR",
      "name": "苏里南",
      "en": "Suriname",
      "tel": "597",
      "pinyin": "sln"

    },
    {
    
    
      "shortName": "ST",
      "name": "圣多美和普林西比",
      "en": "SaoTomeandPrincipe",
      "tel": "239",
      "pinyin": "sdmhplxb"

    },
    {
    
    
      "shortName": "SV",
      "name": "萨尔瓦多",
      "en": "EISalvador",
      "tel": "503",
      "pinyin": "sewd"

    },
    {
    
    
      "shortName": "SY",
      "name": "叙利亚",
      "en": "Syria",
      "tel": "963",
      "pinyin": "xly"

    },
    {
    
    
      "shortName": "SZ",
      "name": "斯威士兰",
      "en": "Swaziland",
      "tel": "268",
      "pinyin": "swsl"

    },
    {
    
    
      "shortName": "TD",
      "name": "乍得",
      "en": "Chad",
      "tel": "235",
      "pinyin": "zd"

    },
    {
    
    
      "shortName": "TG",
      "name": "多哥",
      "en": "Togo",
      "tel": "228",
      "pinyin": "dg"

    },
    {
    
    
      "shortName": "TH",
      "name": "泰国",
      "en": "Thailand",
      "tel": "66",
      "pinyin": "tg"

    },
    {
    
    
      "shortName": "TJ",
      "name": "塔吉克斯坦",
      "en": "Tajikstan",
      "tel": "992",
      "pinyin": "tjkst"

    },
    {
    
    
      "shortName": "TM",
      "name": "土库曼斯坦",
      "en": "Turkmenistan",
      "tel": "993",
      "pinyin": "tkmst"

    },
    {
    
    
      "shortName": "TN",
      "name": "突尼斯",
      "en": "Tunisia",
      "tel": "216",
      "pinyin": "tns"

    },
    {
    
    
      "shortName": "TO",
      "name": "汤加",
      "en": "Tonga",
      "tel": "676",
      "pinyin": "tj"

    },
    {
    
    
      "shortName": "TR",
      "name": "土耳其",
      "en": "Turkey",
      "tel": "90",
      "pinyin": "teq"

    },
    {
    
    
      "shortName": "TT",
      "name": "特立尼达和多巴哥",
      "en": "TrinidadandTobago",
      "tel": "1809",
      "pinyin": "tlndhdbg"

    },
    {
    
    
      "shortName": "TW",
      "name": "台湾(中国)",
      "en": "Taiwan",
      "tel": "886",
      "pinyin": "twzg"

    },
    {
    
    
      "shortName": "TZ",
      "name": "坦桑尼亚",
      "en": "Tanzania",
      "tel": "255",
      "pinyin": "tsny"

    },
    {
    
    
      "shortName": "UA",
      "name": "乌克兰",
      "en": "Ukraine",
      "tel": "380",
      "pinyin": "wkl"

    },
    {
    
    
      "shortName": "UG",
      "name": "乌干达",
      "en": "Uganda",
      "tel": "256",
      "pinyin": "wgd"

    },
    {
    
    
      "shortName": "US",
      "name": "美国",
      "en": "UnitedStatesofAmerica",
      "tel": "1",
      "pinyin": "mg"

    },
    {
    
    
      "shortName": "UY",
      "name": "乌拉圭",
      "en": "Uruguay",
      "tel": "598",
      "pinyin": "wlg"

    },
    {
    
    
      "shortName": "UZ",
      "name": "乌兹别克斯坦",
      "en": "Uzbekistan",
      "tel": "233",
      "pinyin": "wzbkst"

    },
    {
    
    
      "shortName": "VC",
      "name": "圣文森特岛",
      "en": "SaintVincent",
      "tel": "1784",
      "pinyin": "swstd"

    },
    {
    
    
      "shortName": "VE",
      "name": "委内瑞拉",
      "en": "Venezuela",
      "tel": "58",
      "pinyin": "wnrl"

    },
    {
    
    
      "shortName": "VN",
      "name": "越南",
      "en": "Vietnam",
      "tel": "84",
      "pinyin": "yn"

    },
    {
    
    
      "shortName": "YE",
      "name": "也门",
      "en": "Yemen",
      "tel": "967",
      "pinyin": "ym"

    },
    {
    
    
      "shortName": "YU",
      "name": "南斯拉夫",
      "en": "Yugoslavia",
      "tel": "381",
      "pinyin": "nslf"

    },
    {
    
    
      "shortName": "ZA",
      "name": "南非",
      "en": "SouthAfrica",
      "tel": "27",
      "pinyin": "nf"

    },
    {
    
    
      "shortName": "ZM",
      "name": "赞比亚",
      "en": "Zambia",
      "tel": "260",
      "pinyin": "zby"

    },
    {
    
    
      "shortName": "ZR",
      "name": "扎伊尔",
      "en": "Zaire",
      "tel": "243",
      "pinyin": "zye"

    },
    {
    
    
      "shortName": "ZW",
      "name": "津巴布韦",
      "en": "Zimbabwe",
      "tel": "263",
      "pinyin": "jbbw"

    }
  ]
}

猜你喜欢

转载自blog.csdn.net/czssltt/article/details/125448484
今日推荐