├── .gitignore
├── README.md
├── androidcountrycodeselector
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── me
│ │ └── zheteng
│ │ └── countrycodeselector
│ │ ├── Country.java
│ │ ├── CountryCodeSelectorActivity.java
│ │ ├── CountryCodeSelectorFragment.java
│ │ ├── CountryListManager.java
│ │ └── PhoneInputView.java
│ └── res
│ ├── drawable
│ ├── ccs_ic_add_gray.xml
│ ├── ccs_ic_arrow_drop_down_blue_24dp.xml
│ ├── ccs_ic_done_black_24dp.xml
│ ├── ccs_ic_search_16dp.xml
│ ├── ccs_select_country_active.xml
│ ├── ccs_select_country_normal.xml
│ ├── ccs_select_country_selector.xml
│ └── ccs_wrap_ic_arrow_drop_down_black_24dp.xml
│ ├── layout
│ ├── ccs_activity_country_selector.xml
│ ├── ccs_fragment_country_code_selector.xml
│ ├── ccs_item_country.xml
│ ├── ccs_item_search.xml
│ ├── ccs_phone_input_view.xml
│ └── ccsplaceholder_layout.xml
│ ├── raw
│ └── ccs_countries.tsv
│ ├── values-af
│ └── strings.xml
│ ├── values-am
│ └── strings.xml
│ └── values
│ ├── attrs.xml
│ ├── colors.xml
│ ├── dimens.xml
│ └── strings.xml
├── build.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── sample
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── me
│ │ └── zheteng
│ │ └── countrycodeselector
│ │ └── ApplicationTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── me
│ │ │ └── zheteng
│ │ │ └── countrycodeselector
│ │ │ └── sample
│ │ │ └── MainActivity.java
│ └── res
│ │ ├── layout
│ │ └── activity_main.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ └── ic_launcher.png
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── me
│ └── zheteng
│ └── countrycodeselector
│ └── ExampleUnitTest.java
├── screenshots
├── screenshot1.png
└── screenshot2.png
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | AndroidCountryCodeSelector
2 | ===============
3 |
4 | This is a simple library which makes it easier to pick a country code when input phone numbers. The country data is the same as Whatsapp.
5 |
6 | ## Screenshots
7 |
8 | 
9 |
10 | 
11 |
12 | ## Add to dependencies in `build.gradle`
13 |
14 | ```
15 | dependencies {
16 | compile 'me.zheteng:androidcountrycodeselector:0.1.1'
17 | }
18 | ```
19 |
20 | ## Usage
21 |
22 | #### Using PhoneInputView
23 |
24 | -----
25 | ```xml
26 |
31 |
32 |
33 | ```
34 |
35 | XML attributes:
36 |
37 | ```
38 | app:ccs_theme_color="color"
39 | app:ccs_country_selector_type="dialog|activity"
40 | ```
41 |
42 | #### `CountryCodeSelectorFragment` as a fragment
43 |
44 | ```Java
45 | Intent intent = new Intent();
46 | intent.putExtra(PhoneInputView.EXTRA_THEME_COLOR, ContextCompat.getColor(mActivity, R.color.primary));
47 |
48 | getSupportFragmentManager().beginTransaction()
49 | .add(R.id.container, CountryCodeSelectorFragment.newInstance(getIntent()))
50 | .commit();
51 | ```
52 |
53 |
54 | #### `CountryCodeSelectorFragment` as a dialog
55 |
56 | ```
57 | Intent intent = new Intent();
58 | intent.putExtra(PhoneInputView.EXTRA_SELECTOR_TYPE, PhoneInputView.SELECTOR_TYPE_DIALOG);
59 | intent.putExtra(PhoneInputView.EXTRA_THEME_COLOR, ContextCompat.getColor(mActivity, R.color.primary));
60 |
61 | final CountryCodeSelectorFragment picker = CountryCodeSelectorFragment.newInstance(intent);
62 | picker.show(context.getSupportFragmentManager(), "CountryCodeSelector");
63 |
64 | picker.setOnCountrySelectListener(new CountryCodeSelectorFragment.OnCountrySelectListener() {
65 | @Override
66 | public void onCountrySelect(Country country) {
67 | picker.dismiss();
68 | }
69 | });
70 | ```
71 |
72 | ## Pull request is welcome especially the strings translation.
73 |
74 | License
75 | -------
76 |
77 | Copyright 2014 - 2015 Junyue Cao
78 |
79 | Licensed under the Apache License, Version 2.0 (the "License");
80 | you may not use this file except in compliance with the License.
81 | You may obtain a copy of the License at
82 |
83 | http://www.apache.org/licenses/LICENSE-2.0
84 |
85 | Unless required by applicable law or agreed to in writing, software
86 | distributed under the License is distributed on an "AS IS" BASIS,
87 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
88 | See the License for the specific language governing permissions and
89 | limitations under the License.
90 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'com.github.dcendents.android-maven'
3 | apply plugin: 'com.jfrog.bintray'
4 | version = "0.1.1"
5 |
6 |
7 | android {
8 | compileSdkVersion 23
9 | buildToolsVersion "23.0.2"
10 | resourcePrefix "ccs"
11 |
12 | defaultConfig {
13 | minSdkVersion 14
14 | targetSdkVersion 23
15 | versionCode 1
16 | versionName version
17 | }
18 | buildTypes {
19 | release {
20 | minifyEnabled false
21 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
22 | }
23 | }
24 | lintOptions {
25 | abortOnError false
26 | }
27 | }
28 |
29 | dependencies {
30 | compile fileTree(dir: 'libs', include: ['*.jar'])
31 | testCompile 'junit:junit:4.12'
32 | provided 'com.android.support:support-annotations:23.3.0'
33 | compile 'com.android.support:appcompat-v7:23.3.0'
34 | compile 'com.android.support:recyclerview-v7:23.3.0'
35 | compile 'com.univocity:univocity-parsers:2.1.0'
36 | }
37 |
38 | def siteUrl = 'https://github.com/junyuecao/AndroidCountryCodeSelector' // Home page
39 | def gitUrl = 'https://github.com/junyuecao/AndroidCountryCodeSelector.git' // Git repo
40 |
41 | group = "me.zheteng" // Maven Group ID for the artifact
42 | install {
43 | repositories.mavenInstaller {
44 | // This generates POM.xml with proper parameters
45 | pom {
46 | project {
47 | packaging 'aar'
48 | // Add your description here
49 | name 'Simple library for selecting country code for phone number in Android'
50 | url siteUrl
51 | // Set your license
52 | licenses {
53 | license {
54 | name 'The Apache Software License, Version 2.0'
55 | url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
56 | }
57 | }
58 | developers {
59 | developer {
60 | id 'junyuecao' //填写开发者基本信息
61 | name 'junyuecao'
62 | email 'junyuecao@gmail.com'
63 | }
64 | }
65 | scm {
66 | connection gitUrl
67 | developerConnection gitUrl
68 | url siteUrl
69 | }
70 | }
71 | }
72 | }
73 | }
74 |
75 |
76 | task sourcesJar(type: Jar) {
77 | from android.sourceSets.main.java.srcDirs
78 | classifier = 'sources'
79 | }
80 | task javadoc(type: Javadoc) {
81 | source = android.sourceSets.main.java.srcDirs
82 | classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
83 | classpath += configurations.compile
84 | failOnError false
85 | }
86 | task javadocJar(type: Jar, dependsOn: javadoc) {
87 | classifier = 'javadoc'
88 | from javadoc.destinationDir
89 | }
90 | artifacts {
91 | archives javadocJar
92 | archives sourcesJar
93 | }
94 | Properties properties = new Properties()
95 | properties.load(project.rootProject.file('local.properties').newDataInputStream())
96 | bintray {
97 | user = properties.getProperty("bintray.user")
98 | key = properties.getProperty("bintray.apikey")
99 | configurations = ['archives']
100 | pkg {
101 | repo = "maven" // The repo we upload to
102 | name = "AndroidCountryCodeSelector" //Project name
103 | websiteUrl = siteUrl
104 | vcsUrl = gitUrl
105 | licenses = ["Apache-2.0"]
106 | publish = true
107 | }
108 | }
--------------------------------------------------------------------------------
/androidcountrycodeselector/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/junyuecao/Work/adt-bundle-mac-x86_64-20140702/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
6 |
7 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/java/me/zheteng/countrycodeselector/Country.java:
--------------------------------------------------------------------------------
1 | package me.zheteng.countrycodeselector;
2 |
3 | import java.util.List;
4 |
5 | import android.os.Parcel;
6 | import android.os.Parcelable;
7 |
8 | /**
9 | * Country contains phone information of a country
10 | */
11 | public class Country implements Parcelable {
12 | /**
13 | * ISO code of this country. eg: US, CN
14 | */
15 | private String isoCode;
16 | /**
17 | * Country name. This is for display to user.
18 | */
19 | private String name;
20 |
21 | /**
22 | * Country code. also as known as phone country code.
23 | */
24 | private String code;
25 |
26 | /**
27 | * Mobile Country Code,MCC
28 | *
29 | * MCC / MNC see:
30 | * https://en.wikipedia.org/wiki/Mobile_country_code
31 | */
32 | private String mcc;
33 |
34 | /**
35 | * Mobile Network Code,MNC
36 | *
37 | * MCC / MNC see:
38 | * https://en.wikipedia.org/wiki/Mobile_country_code
39 | */
40 | private String mnc;
41 |
42 | /**
43 | * Country's English Name;
44 | */
45 | private String nameInEnglish;
46 |
47 | /**
48 | * Reg exp to check if a phone number is legal.
49 | */
50 | private List phonePatterns;
51 |
52 | /**
53 | * Reg exp group that corresponding with {@link #phonePatterns}
54 | */
55 | private List phonePatternGroups;
56 |
57 | /**
58 | * ISO code of this country. eg: US, CN
59 | */
60 | public String getIsoCode() {
61 | return isoCode;
62 | }
63 |
64 | /**
65 | * ISO code of this country. eg: US, CN
66 | */
67 | public void setIsoCode(String isoCode) {
68 | this.isoCode = isoCode;
69 | }
70 |
71 | /**
72 | * Country name. This is for display to user.
73 | */
74 | public String getName() {
75 | return name;
76 | }
77 |
78 | /**
79 | * Country name. This is for display to user.
80 | */
81 | public void setName(String name) {
82 | this.name = name;
83 | }
84 |
85 | /**
86 | * Country code. also as known as phone country code.
87 | */
88 | public String getCode() {
89 | return code;
90 | }
91 |
92 | /**
93 | * Country code. also as known as phone country code.
94 | */
95 | public void setCode(String code) {
96 | this.code = code;
97 | }
98 |
99 | /**
100 | * Mobile Country Code,MCC
101 | *
102 | * MCC / MNC see:
103 | * https://en.wikipedia.org/wiki/Mobile_country_code
104 | */
105 | public String getMcc() {
106 | return mcc;
107 | }
108 |
109 | /**
110 | * Mobile Country Code,MCC
111 | *
112 | * MCC / MNC see:
113 | * https://en.wikipedia.org/wiki/Mobile_country_code
114 | */
115 | public void setMcc(String mcc) {
116 | this.mcc = mcc;
117 | }
118 |
119 | /**
120 | * Mobile Network Code,MNC
121 | *
122 | * MCC / MNC see:
123 | * https://en.wikipedia.org/wiki/Mobile_country_code
124 | */
125 | public String getMnc() {
126 | return mnc;
127 | }
128 |
129 | /**
130 | * Mobile Network Code,MNC
131 | *
132 | * MCC / MNC see:
133 | * https://en.wikipedia.org/wiki/Mobile_country_code
134 | */
135 | public void setMnc(String mnc) {
136 | this.mnc = mnc;
137 | }
138 |
139 | /**
140 | * Country's English Name;
141 | */
142 | public String getNameInEnglish() {
143 | return nameInEnglish;
144 | }
145 |
146 | /**
147 | * Country's English Name;
148 | */
149 | public void setNameInEnglish(String nameInEnglish) {
150 | this.nameInEnglish = nameInEnglish;
151 | }
152 |
153 | /**
154 | * Reg exp to check if a phone number is legal.
155 | */
156 | public List getPhonePatterns() {
157 | return phonePatterns;
158 | }
159 |
160 | /**
161 | * Reg exp to check if a phone number is legal.
162 | */
163 | public void setPhonePatterns(List phonePatterns) {
164 | this.phonePatterns = phonePatterns;
165 | }
166 |
167 | /**
168 | * Reg exp group that corresponding with {@link #phonePatterns}
169 | */
170 | public List getPhonePatternGroups() {
171 | return phonePatternGroups;
172 | }
173 |
174 | /**
175 | * Reg exp group that corresponding with {@link #phonePatterns}
176 | */
177 | public void setPhonePatternGroups(List phonePatternGroups) {
178 | this.phonePatternGroups = phonePatternGroups;
179 | }
180 |
181 | @Override
182 | public int describeContents() {
183 | return 0;
184 | }
185 |
186 | @Override
187 | public void writeToParcel(Parcel dest, int flags) {
188 | dest.writeString(this.isoCode);
189 | dest.writeString(this.name);
190 | dest.writeString(this.code);
191 | dest.writeString(this.mcc);
192 | dest.writeString(this.mnc);
193 | dest.writeString(this.nameInEnglish);
194 | dest.writeStringList(this.phonePatterns);
195 | dest.writeStringList(this.phonePatternGroups);
196 | }
197 |
198 | public Country() {
199 | }
200 |
201 | protected Country(Parcel in) {
202 | this.isoCode = in.readString();
203 | this.name = in.readString();
204 | this.code = in.readString();
205 | this.mcc = in.readString();
206 | this.mnc = in.readString();
207 | this.nameInEnglish = in.readString();
208 | this.phonePatterns = in.createStringArrayList();
209 | this.phonePatternGroups = in.createStringArrayList();
210 | }
211 |
212 | public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {
213 | @Override
214 | public Country createFromParcel(Parcel source) {
215 | return new Country(source);
216 | }
217 |
218 | @Override
219 | public Country[] newArray(int size) {
220 | return new Country[size];
221 | }
222 | };
223 | }
224 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/java/me/zheteng/countrycodeselector/CountryCodeSelectorActivity.java:
--------------------------------------------------------------------------------
1 | package me.zheteng.countrycodeselector;
2 |
3 | import android.content.BroadcastReceiver;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.content.IntentFilter;
7 | import android.os.Bundle;
8 | import android.support.annotation.Nullable;
9 | import android.support.v7.app.AppCompatActivity;
10 | import android.view.MenuItem;
11 |
12 | /**
13 | * Select the country
14 | */
15 | public class CountryCodeSelectorActivity extends AppCompatActivity {
16 | /**
17 | * Receive country select result
18 | */
19 | private BroadcastReceiver mResultReceiver = new BroadcastReceiver() {
20 | @Override
21 | public void onReceive(Context context, Intent intent) {
22 | finish();
23 | }
24 | };
25 |
26 | @Override
27 | protected void onCreate(@Nullable Bundle savedInstanceState) {
28 | super.onCreate(savedInstanceState);
29 | setContentView(R.layout.ccs_activity_country_selector);
30 |
31 | setTitle(R.string.ccs_choose_a_country);
32 | getSupportFragmentManager().beginTransaction()
33 | .add(R.id.container, CountryCodeSelectorFragment.newInstance(getIntent()))
34 | .commit();
35 |
36 | getSupportActionBar().setDisplayHomeAsUpEnabled(true);
37 |
38 |
39 | IntentFilter filter = new IntentFilter(PhoneInputView.ACTION_SEND_RESULT);
40 | registerReceiver(mResultReceiver, filter);
41 | }
42 |
43 | @Override
44 | public boolean onOptionsItemSelected(MenuItem item) {
45 | switch (item.getItemId()) {
46 | case android.R.id.home:
47 | finish();
48 | return true;
49 | }
50 | return super.onOptionsItemSelected(item);
51 | }
52 |
53 |
54 | @Override
55 | protected void onDestroy() {
56 | super.onDestroy();
57 | unregisterReceiver(mResultReceiver);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/java/me/zheteng/countrycodeselector/CountryCodeSelectorFragment.java:
--------------------------------------------------------------------------------
1 | package me.zheteng.countrycodeselector;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import android.content.Intent;
7 | import android.graphics.PorterDuff;
8 | import android.os.Bundle;
9 | import android.support.annotation.Nullable;
10 | import android.support.v4.app.DialogFragment;
11 | import android.support.v4.content.ContextCompat;
12 | import android.support.v4.content.LocalBroadcastManager;
13 | import android.support.v7.widget.LinearLayoutManager;
14 | import android.support.v7.widget.RecyclerView;
15 | import android.text.Editable;
16 | import android.text.TextUtils;
17 | import android.text.TextWatcher;
18 | import android.view.LayoutInflater;
19 | import android.view.View;
20 | import android.view.ViewGroup;
21 | import android.widget.EditText;
22 | import android.widget.ImageView;
23 | import android.widget.TextView;
24 |
25 | /**
26 | * Country Code Selector Fragment
27 | */
28 | public class CountryCodeSelectorFragment extends DialogFragment implements TextWatcher {
29 | private static final String TAG = "CCSFragment";
30 |
31 | private List mCountryList;
32 | private RecyclerView mRecyclerView;
33 | private CountryListAdapter mAdapter;
34 | private int mThemeColor;
35 |
36 | private OnCountrySelectListener mOnCountrySelectListener;
37 | private int mType;
38 |
39 | public static CountryCodeSelectorFragment newInstance(Intent intent) {
40 |
41 | Bundle args = intent.getExtras();
42 | CountryCodeSelectorFragment fragment = new CountryCodeSelectorFragment();
43 | fragment.setArguments(args);
44 | return fragment;
45 | }
46 |
47 | @Override
48 | public void onCreate(@Nullable Bundle savedInstanceState) {
49 | super.onCreate(savedInstanceState);
50 |
51 | Bundle arguments = getArguments();
52 | mThemeColor = arguments.getInt(PhoneInputView.EXTRA_THEME_COLOR,
53 | ContextCompat.getColor(getActivity(), R.color.ccs_default_color));
54 | mType = arguments.getInt(PhoneInputView.EXTRA_SELECTOR_TYPE);
55 | mCountryList = CountryListManager.from(getActivity()).getList();
56 | }
57 |
58 | @Nullable
59 | @Override
60 | public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
61 | @Nullable Bundle savedInstanceState) {
62 | View view = inflater.inflate(R.layout.ccs_fragment_country_code_selector, container, false);
63 |
64 | mRecyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);
65 | mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
66 | mAdapter = new CountryListAdapter();
67 | mRecyclerView.setAdapter(mAdapter);
68 | mAdapter.setList(mCountryList);
69 |
70 | if (mType == PhoneInputView.SELECTOR_TYPE_DIALOG) {
71 | getDialog().setTitle(R.string.ccs_choose_a_country);
72 |
73 | int width = getResources().getDimensionPixelSize(R.dimen.ccs_dialog_width);
74 | int height = getResources().getDimensionPixelSize(R.dimen.ccs_dialog_height);
75 | getDialog().getWindow().setLayout(width, height);
76 | }
77 | return view;
78 | }
79 |
80 | @Override
81 | public void beforeTextChanged(CharSequence s, int start, int count, int after) {
82 |
83 | }
84 |
85 | @Override
86 | public void onTextChanged(CharSequence s, int start, int before, int count) {
87 | mAdapter.setFilter(s.toString());
88 | }
89 |
90 | @Override
91 | public void afterTextChanged(Editable s) {
92 |
93 | }
94 |
95 | public OnCountrySelectListener getOnCountrySelectListener() {
96 | return mOnCountrySelectListener;
97 | }
98 |
99 | public void setOnCountrySelectListener(OnCountrySelectListener onCountrySelectListener) {
100 | mOnCountrySelectListener = onCountrySelectListener;
101 | }
102 |
103 | /**
104 | * Country list adapter
105 | */
106 | public class CountryListAdapter extends RecyclerView.Adapter {
107 | public static final int VIEW_TYPE_SEARCH = 1;
108 | public static final int VIEW_TYPE_ITEM = 2;
109 | List mList;
110 | List mFilteredList = new ArrayList<>();
111 | /**
112 | * active position in mList
113 | */
114 | int mActive;
115 |
116 | @Override
117 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
118 | LayoutInflater inflater = LayoutInflater.from(parent.getContext());
119 | View view;
120 | RecyclerView.ViewHolder holder = null;
121 | switch (viewType) {
122 | case VIEW_TYPE_ITEM:
123 | view = inflater.inflate(R.layout.ccs_item_country, parent, false);
124 | holder = new CountryViewHolder(view);
125 | break;
126 | case VIEW_TYPE_SEARCH:
127 | view = inflater.inflate(R.layout.ccs_item_search, parent, false);
128 | holder = new SearchViewHolder(view);
129 | break;
130 | }
131 |
132 | return holder;
133 | }
134 |
135 | @Override
136 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
137 | if (holder instanceof CountryViewHolder) {
138 | CountryViewHolder viewHolder = (CountryViewHolder) holder;
139 | Country country = mFilteredList.get(position - 1);
140 | viewHolder.itemView.setTag(country);
141 | viewHolder.countryName.setText(country.getName());
142 | viewHolder.countryNameEnglish.setText(country.getNameInEnglish());
143 | viewHolder.countryCode.setText("+" + country.getCode());
144 |
145 | if (TextUtils.equals(country.getName(), country.getNameInEnglish())) {
146 | viewHolder.countryNameEnglish.setVisibility(View.GONE);
147 | } else {
148 | viewHolder.countryNameEnglish.setVisibility(View.VISIBLE);
149 | }
150 |
151 | if (position == mActive) {
152 | viewHolder.active.setVisibility(View.VISIBLE);
153 | viewHolder.countryName.setTextColor(mThemeColor);
154 | } else {
155 | viewHolder.active.setVisibility(View.INVISIBLE);
156 | viewHolder.countryName
157 | .setTextColor(ContextCompat.getColor(getActivity(), android.R.color.black));
158 | }
159 | } else if (holder instanceof SearchViewHolder) {
160 | SearchViewHolder viewHolder = (SearchViewHolder) holder;
161 |
162 | viewHolder.search.requestFocus();
163 | }
164 | }
165 |
166 | @Override
167 | public int getItemCount() {
168 | return getListSize() + 1;
169 | }
170 |
171 | public void setList(List list) {
172 | mList = list;
173 | if (mList != null) {
174 | mFilteredList.addAll(mList);
175 | }
176 | notifyDataSetChanged();
177 | }
178 |
179 | public void setFilter(String s) {
180 | mFilteredList.clear();
181 | for (Country country : mList) {
182 | if (TextUtils.isEmpty(s) // filter is empty
183 | || country.getCode().toLowerCase().contains(s.toLowerCase())
184 | || country.getName().toLowerCase().contains(s.toLowerCase())
185 | || country.getNameInEnglish().toLowerCase().contains(s.toLowerCase())) {
186 | mFilteredList.add(country);
187 | }
188 | }
189 | notifyDataSetChanged();
190 | }
191 |
192 | private int getListSize() {
193 | return mFilteredList == null ? 0 : mFilteredList.size();
194 | }
195 |
196 | @Override
197 | public int getItemViewType(int position) {
198 | if (position == 0) {
199 | return VIEW_TYPE_SEARCH;
200 | } else {
201 | return VIEW_TYPE_ITEM;
202 | }
203 | }
204 | }
205 |
206 | public class CountryViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
207 | TextView countryName;
208 | TextView countryNameEnglish;
209 | TextView countryCode;
210 | ImageView active;
211 |
212 | public CountryViewHolder(View itemView) {
213 | super(itemView);
214 |
215 | countryName = (TextView) itemView.findViewById(R.id.country_name);
216 | countryNameEnglish = (TextView) itemView.findViewById(R.id.country_name_english);
217 | countryCode = (TextView) itemView.findViewById(R.id.county_code);
218 | active = (ImageView) itemView.findViewById(R.id.active);
219 |
220 | itemView.setOnClickListener(this);
221 | }
222 |
223 | @Override
224 | public void onClick(View v) {
225 | Country country = (Country) itemView.getTag();
226 |
227 | Intent intent = new Intent(PhoneInputView.ACTION_SEND_RESULT);
228 | intent.putExtra(PhoneInputView.EXTRA_COUNTRY, country);
229 | LocalBroadcastManager.getInstance(getActivity()).sendBroadcast(intent);
230 |
231 | if (mOnCountrySelectListener != null) {
232 | mOnCountrySelectListener.onCountrySelect(country);
233 | }
234 | }
235 | }
236 |
237 | public class SearchViewHolder extends RecyclerView.ViewHolder {
238 | EditText search;
239 |
240 | public SearchViewHolder(View itemView) {
241 | super(itemView);
242 |
243 | search = (EditText) itemView.findViewById(R.id.search);
244 | search.getBackground().setColorFilter(mThemeColor, PorterDuff.Mode.SRC_ATOP);
245 | search.addTextChangedListener(CountryCodeSelectorFragment.this);
246 | }
247 | }
248 |
249 | public interface OnCountrySelectListener {
250 | void onCountrySelect(Country country);
251 | }
252 | }
253 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/java/me/zheteng/countrycodeselector/CountryListManager.java:
--------------------------------------------------------------------------------
1 | package me.zheteng.countrycodeselector;
2 |
3 | import java.io.InputStream;
4 | import java.util.ArrayList;
5 | import java.util.Arrays;
6 | import java.util.List;
7 |
8 | import com.univocity.parsers.tsv.TsvParser;
9 | import com.univocity.parsers.tsv.TsvParserSettings;
10 |
11 | import android.content.Context;
12 |
13 | /**
14 | *
15 | */
16 | public class CountryListManager {
17 |
18 | private List mList;
19 | private static CountryListManager INSTANCE;
20 |
21 | private CountryListManager(InputStream inputStream) {
22 | mList = parseCountryList(inputStream);
23 | }
24 |
25 | public static CountryListManager from(Context context) {
26 | if (INSTANCE == null) {
27 | synchronized(CountryListManager.class) {
28 | if (INSTANCE == null) {
29 | INSTANCE = new CountryListManager(context.getResources().openRawResource(R.raw.ccs_countries));
30 | }
31 | }
32 | }
33 | return INSTANCE;
34 | }
35 |
36 | public List parseCountryList(InputStream is) {
37 | try {
38 | TsvParserSettings settings = new TsvParserSettings();
39 | settings.getFormat().setLineSeparator("\n");
40 | // creates a TSV parser
41 | TsvParser parser = new TsvParser(settings);
42 | List allRows = parser.parseAll(is);
43 | List countries = new ArrayList<>();
44 |
45 | for (String[] allRow : allRows) {
46 | Country country = new Country();
47 | country.setIsoCode(allRow[0]);
48 | country.setName(allRow[1]);
49 | country.setCode(allRow[2]);
50 | country.setMcc(allRow[3]);
51 | country.setMnc(allRow[4]);
52 |
53 | String pattern = allRow[7];
54 | if (pattern != null) {
55 | String[] split = pattern.split(";");
56 | country.setPhonePatterns(Arrays.asList(split));
57 | }
58 |
59 | String group = allRow[8];
60 | if (group != null) {
61 | String[] split = group.split(";");
62 | country.setPhonePatternGroups(Arrays.asList(split));
63 | }
64 |
65 | country.setNameInEnglish(allRow[11]);
66 |
67 | countries.add(country);
68 | }
69 | return countries;
70 | } catch (Exception ex) {
71 | return null;
72 | }
73 | }
74 |
75 | public List getList() {
76 | return mList;
77 | }
78 |
79 | /**
80 | * release the list
81 | */
82 | public synchronized void release() {
83 | if (mList != null) {
84 | mList.clear();
85 | mList = null;
86 | INSTANCE = null;
87 | }
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/java/me/zheteng/countrycodeselector/PhoneInputView.java:
--------------------------------------------------------------------------------
1 | package me.zheteng.countrycodeselector;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import android.content.BroadcastReceiver;
7 | import android.content.Context;
8 | import android.content.Intent;
9 | import android.content.IntentFilter;
10 | import android.content.res.TypedArray;
11 | import android.graphics.PorterDuff;
12 | import android.graphics.drawable.Drawable;
13 | import android.support.annotation.ColorInt;
14 | import android.support.annotation.IntDef;
15 | import android.support.annotation.IntRange;
16 | import android.support.v4.app.FragmentActivity;
17 | import android.support.v4.content.ContextCompat;
18 | import android.text.Editable;
19 | import android.text.TextWatcher;
20 | import android.util.AttributeSet;
21 | import android.view.LayoutInflater;
22 | import android.view.View;
23 | import android.widget.EditText;
24 | import android.widget.FrameLayout;
25 | import android.widget.TextView;
26 |
27 | /**
28 | * This layout contains a country selector, a country code EditText and a phone number EditText
29 | */
30 | public class PhoneInputView extends FrameLayout {
31 | public static final String ACTION_SEND_RESULT = BuildConfig.APPLICATION_ID + ".action.SendResult";
32 | public static final String EXTRA_COUNTRY = BuildConfig.APPLICATION_ID + ".extra.Country";
33 | public static final String EXTRA_THEME_COLOR = BuildConfig.APPLICATION_ID + ".extra.ThemeColor";
34 | public static final String EXTRA_SELECTOR_TYPE = BuildConfig.APPLICATION_ID + ".extra.Type";
35 | public static final int SELECTOR_TYPE_ACTIVITY = 0;
36 | public static final int SELECTOR_TYPE_DIALOG = 1;
37 | private int mThemeColor;
38 | private int mCountrySelectorType;
39 |
40 | private EditText mPhoneNumber;
41 |
42 | ;
43 | private EditText mCountryCode;
44 | private Context mContext;
45 | private TextView mCountryName;
46 | private final OnClickListener mOnClickListener = new OnClickListener() {
47 |
48 | public void onClick(View v) {
49 | if (v == mCountryName) {
50 | onCountryNameClicked();
51 | }
52 | }
53 | };
54 | /**
55 | * Receive country select result
56 | */
57 | private BroadcastReceiver mResultReceiver = new BroadcastReceiver() {
58 | @Override
59 | public void onReceive(Context context, Intent intent) {
60 | Country country = intent.getParcelableExtra(EXTRA_COUNTRY);
61 | mCountryName.setText(country.getName());
62 | mCountryCode.setText(country.getCode());
63 |
64 | mPhoneNumber.requestFocus();
65 |
66 | }
67 | };
68 | /**
69 | * Callback to watch the text field for empty/non-empty
70 | */
71 | private TextWatcher mTextWatcher = new TextWatcher() {
72 |
73 | public void beforeTextChanged(CharSequence s, int start, int before, int after) {
74 |
75 | }
76 |
77 | public void onTextChanged(CharSequence s, int start, int before, int after) {
78 | if (s.length() == 0) {
79 | mCountryName.setText(R.string.ccs_choose_a_country);
80 | } else {
81 | Country country = getCountryByCode(s.toString());
82 |
83 | if (country != null) {
84 | mCountryName.setText(country.getName());
85 | mPhoneNumber.requestFocus();
86 | } else {
87 | mCountryName.setText(R.string.ccs_invalid_country_code);
88 | }
89 | }
90 | }
91 |
92 | public void afterTextChanged(Editable s) {
93 |
94 | }
95 | };
96 |
97 | public PhoneInputView(Context context) {
98 | this(context, null);
99 | }
100 |
101 | public PhoneInputView(Context context, AttributeSet attrs) {
102 | this(context, attrs, 0);
103 | }
104 |
105 | public PhoneInputView(Context context, AttributeSet attrs, int defStyleAttr) {
106 | super(context, attrs, defStyleAttr);
107 | mContext = context;
108 |
109 | final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ccs_PhoneInputView, defStyleAttr, 0);
110 |
111 | final LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
112 | final int layoutResId = a.getResourceId(R.styleable.ccs_PhoneInputView_ccs_layout, R.layout.ccs_phone_input_view);
113 | inflater.inflate(layoutResId, this, true);
114 |
115 | mCountryName = (TextView) findViewById(R.id.select_country);
116 | mCountryCode = (EditText) findViewById(R.id.edit_country_code);
117 | mPhoneNumber = (EditText) findViewById(R.id.edit_phone_number);
118 |
119 | // theme color
120 | mThemeColor = a.getColor(R.styleable.ccs_PhoneInputView_ccs_theme_color,
121 | ContextCompat.getColor(context, R.color.ccs_default_color));
122 | mCountryName.getBackground().setColorFilter(mThemeColor, PorterDuff.Mode.SRC_ATOP);
123 | Drawable[] drawables = mCountryName.getCompoundDrawables();
124 | for (Drawable drawable : drawables) {
125 | if (drawable != null) {
126 | drawable.setColorFilter(mThemeColor, PorterDuff.Mode.SRC_ATOP);
127 | }
128 | }
129 | mPhoneNumber.getBackground().setColorFilter(mThemeColor, PorterDuff.Mode.SRC_ATOP);
130 | mCountryCode.getBackground().setColorFilter(mThemeColor, PorterDuff.Mode.SRC_ATOP);
131 |
132 | // country selector type
133 | mCountrySelectorType = a.getInt(R.styleable.ccs_PhoneInputView_ccs_country_selector_type, SELECTOR_TYPE_ACTIVITY);
134 |
135 | // add listeners
136 | mCountryName.setOnClickListener(mOnClickListener);
137 | mCountryCode.addTextChangedListener(mTextWatcher);
138 |
139 | mCountryCode.setText("1");
140 | // recycle
141 | a.recycle();
142 | }
143 |
144 | /**
145 | * Get the phone number field text value
146 | *
147 | * @return the String in phone number field
148 | */
149 | public String getPhoneNumber() {
150 | return mPhoneNumber.getText().toString();
151 | }
152 |
153 | /**
154 | * Get the country code field text value
155 | *
156 | * @return the String in country code field
157 | */
158 | public String getCountryCode() {
159 | return mCountryCode.getText().toString();
160 | }
161 |
162 | /**
163 | * Set country code. from 1 - 999
164 | *
165 | * @param code country code
166 | */
167 | public void setCountryCode(@IntRange(from = 1, to = 999) int code) {
168 | mCountryCode.setText("" + code);
169 | }
170 |
171 | /**
172 | * Setter for theme color
173 | *
174 | * @param color theme color
175 | */
176 | public void setThemeColor(@ColorInt int color) {
177 | mThemeColor = color;
178 | }
179 |
180 | /**
181 | * Getter for theme color
182 | *
183 | * @return theme color
184 | */
185 | @ColorInt
186 | public int getThemeColor() {
187 | return mThemeColor;
188 | }
189 |
190 | @Override
191 | protected void onAttachedToWindow() {
192 | super.onAttachedToWindow();
193 |
194 | IntentFilter filter = new IntentFilter(ACTION_SEND_RESULT);
195 | mContext.registerReceiver(mResultReceiver, filter);
196 | }
197 |
198 | @Override
199 | protected void onDetachedFromWindow() {
200 | super.onDetachedFromWindow();
201 | mContext.unregisterReceiver(mResultReceiver);
202 | }
203 |
204 | private Country getCountryByCode(String s) {
205 | List list = CountryListManager.from(getContext()).getList();
206 | if (list == null) {
207 | return null;
208 | }
209 | List tmp = new ArrayList<>();
210 | for (Country country : list) {
211 | // There are many country use the same code, some of them has no Regexp patterns
212 | if (country.getCode().equals(s)) {
213 | tmp.add(country);
214 | }
215 | }
216 | if (tmp.size() == 1) {
217 | return tmp.get(0);
218 | } else if (tmp.size() == 0) {
219 | return null;
220 | } else {
221 | for (Country country : tmp) {
222 | if (country.getPhonePatterns() != null) {
223 | return country;
224 | }
225 | }
226 | return tmp.get(0);
227 | }
228 | }
229 |
230 | private void onCountryNameClicked() {
231 | if (mCountrySelectorType == SELECTOR_TYPE_ACTIVITY) {
232 | Intent intent = new Intent(mContext, CountryCodeSelectorActivity.class);
233 | intent.putExtra(EXTRA_THEME_COLOR, mThemeColor);
234 | intent.putExtra(EXTRA_SELECTOR_TYPE, SELECTOR_TYPE_ACTIVITY);
235 | mContext.startActivity(intent);
236 |
237 | } else if (mCountrySelectorType == SELECTOR_TYPE_DIALOG) {
238 | if (mContext instanceof FragmentActivity) {
239 | FragmentActivity context = (FragmentActivity) mContext;
240 |
241 | Intent intent = new Intent();
242 | intent.putExtra(EXTRA_THEME_COLOR, mThemeColor);
243 | intent.putExtra(EXTRA_SELECTOR_TYPE, SELECTOR_TYPE_DIALOG);
244 | final CountryCodeSelectorFragment picker = CountryCodeSelectorFragment.newInstance(intent);
245 | picker.show(context.getSupportFragmentManager(), "COUNTRY_CODE_PICKER");
246 |
247 | picker.setOnCountrySelectListener(new CountryCodeSelectorFragment.OnCountrySelectListener() {
248 | @Override
249 | public void onCountrySelect(Country country) {
250 | picker.dismiss();
251 | }
252 | });
253 | } else {
254 | throw new IllegalStateException("Activity should be instance of FragmentActivity");
255 | }
256 |
257 | }
258 | }
259 |
260 | /**
261 | * Setter for country selector type
262 | *
263 | * @param selectorType can be {@link #SELECTOR_TYPE_ACTIVITY} or {@link #SELECTOR_TYPE_DIALOG}
264 | */
265 | public void setCountrySelectorType(@SelectorType int selectorType) {
266 | mCountrySelectorType = selectorType;
267 | }
268 |
269 | /**
270 | * Getter for country selector type
271 | *
272 | * @return can be {@link #SELECTOR_TYPE_ACTIVITY} or {@link #SELECTOR_TYPE_DIALOG}
273 | */
274 | public int getCountrySelectorType() {
275 | return mCountrySelectorType;
276 | }
277 |
278 | @IntDef({SELECTOR_TYPE_ACTIVITY, SELECTOR_TYPE_DIALOG})
279 | public @interface SelectorType {
280 | }
281 | }
282 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/drawable/ccs_ic_add_gray.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/drawable/ccs_ic_arrow_drop_down_blue_24dp.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/drawable/ccs_ic_done_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/drawable/ccs_ic_search_16dp.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/drawable/ccs_select_country_active.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/drawable/ccs_select_country_normal.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/drawable/ccs_select_country_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
8 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/drawable/ccs_wrap_ic_arrow_drop_down_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/layout/ccs_activity_country_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
10 |
11 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/layout/ccs_fragment_country_code_selector.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
12 |
13 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/layout/ccs_item_country.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
15 |
20 |
25 |
33 |
41 |
42 |
53 |
59 |
60 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/layout/ccs_item_search.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
18 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/layout/ccs_phone_input_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
21 |
22 |
29 |
33 |
44 |
55 |
56 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/layout/ccsplaceholder_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/raw/ccs_countries.tsv:
--------------------------------------------------------------------------------
1 | IN India 91 404,405 10 0 X (\d{5})(\d{5});(\d{2})(\d{4})(\d{4});(\d{3})(\d{3})(\d{4});(\d{3})(\d{3})(\d{4});(\d{3})(\d{3})(\d{4});(\d{4})(\d{3})(\d{3});(1600)(\d{2})(\d{4});(1800)(\d{4,5});(18[06]0)(\d{2,4})(\d{4});(140)(\d{3})(\d{4});(\d{4})(\d{3})(\d{3})(\d{3}) $1 $2;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2;$1 $2 $3;$1 $2 $3;$1 $2 $3 $4 7(?:[0257]|3[013-57-9]|4[0-389]|6[0-35-9]|8[0-79])|8(?:0[015689]|1[0-57-9]|2[2356-9]|3[0-57-9]|[45]|6[02457-9]|7[01-69]|8[0-24-9]|9[02-9])|9#7(?:0|2(?:[0235679]|[14][017-9]|8[0-59]|9[389])|3(?:[058]|1[09]|31|48|7[3679]|9[689])|4(?:0[1-9]|1[015-9]|[29][89]|39|8[389])|5(?:[034678]|2[03-9]|5[017-9]|9[7-9])|6(?:0[0-47]|1[0-257-9]|2[0-4]|3[19]|5[4589]|[6-9])|7(?:0[2-9]|[1-79]|8[1-9])|8[0-79])|8(?:0(?:[01589]|6[67])|1(?:[02-57-9]|1[0135-9])|2(?:[236-9]|5[1-9])|3(?:[0357-9]|4[1-9])|[45]|6[02457-9]|7(?:07|[1-69])|8(?:[0-26-9]|44|5[2-9])|9(?:[035-9]|2[2-9]|4[0-8]))|9;11|2[02]|33|4[04]|79|80[2-46];1(?:2[0-249]|3[0-25]|4[145]|[569][14]|7[1257]|8[1346]|[68][1-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|[36][25]|22|4[28]|5[12]|[78]1|9[15])|6(?:12|[2345]1|57|6[13]|7[14]|80);7(?:12|2[14]|3[134]|4[47]|5[15]|[67]1|88)#7(?:12|2[14]|3[134]|4[47]|5(?:1|5[2-6])|[67]1|88);8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91);1(?:[23579]|[468][1-9])|[2-8];160#1600;180#1800;18[06]#18[06]0;140;18[06]#18(?:0[03]|6[12]) X India
2 | BR Brasil 55 724 10,11 0 X (\d{4})(\d{4});(\d{5})(\d{4});(\d{3,5});(\d{2})(\d{5})(\d{4});(\d{2})(\d{4})(\d{4});(\d{4})(\d{4});([3589]00)(\d{2,3})(\d{4}) $1-$2;$1-$2;$1;$1 $2-$3;$1 $2-$3;$1-$2;$1 $2 $3 [2-9](?:[1-9]|0[1-9]);9(?:[1-9]|0[1-9]);1[125689];(?:[189][1-9]|2[12478]|3[1-578]|7[13-579])9;[1-9][1-9];(?:300|40(?:0|20));[3589]00 X Brazil
3 | ES España 34 214 9 0 X ([89]00)(\d{3})(\d{3});([5-9]\d{2})(\d{2})(\d{2})(\d{2}) $1 $2 $3;$1 $2 $3 $4 [89]00;[568]|[79][0-8] X Spain
4 | DE Deutschland 49 262 7,8,9,10,11,12 0 X (1\d{2})(\d{7,8});(15\d{3})(\d{6});(1\d{3})(\d{7});(\d{2})(\d{3,11});(\d{3})(\d{3,11});(\d{4})(\d{2,11});(3\d{4})(\d{1,10});(800)(\d{7,12});(177)(99)(\d{7,8});(\d{3})(\d)(\d{4,10});(1\d{2})(\d{5,11});(18\d{3})(\d{6});(18\d{2})(\d{7});(18\d)(\d{8});(700)(\d{4})(\d{4});(138)(\d{4}) $1 $2;$1 $2;$1 $2;$1 $2;$1 $2;$1 $2;$1 $2;$1 $2;$1 $2 $3;$1 $2 $3;$1 $2;$1 $2;$1 $2;$1 $2;$1 $2 $3;$1 $2 1[67];15[0568];15;3[02]|40|[68]9;2(?:\d1|0[2389]|1[24]|28|34)|3(?:[3-9][15]|40)|[4-8][1-9]1|9(?:06|[1-9]1);[24-6]|[7-9](?:\d[1-9]|[1-9]\d)|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])#[24-6]|[7-9](?:\d[1-9]|[1-9]\d)|3(?:3(?:0[1-467]|2[127-9]|3[124578]|[46][1246]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|3[1357]|4[13578]|6[1246]|7[1356]|9[1346])|5(?:0[14]|2[1-3589]|3[1357]|4[1246]|6[1-4]|7[1346]|8[13568]|9[1246])|6(?:0[356]|2[1-489]|3[124-6]|4[1347]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|3[1357]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|4[1347]|6[0135-9]|7[1467]|8[136])|9(?:0[12479]|2[1358]|3[1357]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]));3;800;177#1779#17799;(?:18|90)0|137#1(?:37|80)|900[1359];181;185#1850#18500;18[68];18[2-579];700;138 X Germany
5 | MX México 52 334 10,11 0 X ([358]\d)(\d{4})(\d{4});(\d{3})(\d{3})(\d{4});(1)([358]\d)(\d{4})(\d{4});(1)(\d{3})(\d{3})(\d{4}) $1 $2 $3;$1 $2 $3;$1 $2 $3 $4;$1 $2 $3 $4 33|55|81;[2467]|3[0-2457-9]|5[089]|8[02-9]|9[0-35-9];1(?:33|55|81);1(?:[2467]|3[0-2457-9]|5[089]|8[2-9]|9[1-35-9]) X Mexico
6 | IT Italia 39 222 9,10 X (\d{2})(\d{3,4})(\d{4});(0[26])(\d{4})(\d{5});(0[26])(\d{4,6});(0\d{2})(\d{3,4})(\d{4});(\d{3})(\d{3,6});(0\d{3})(\d{3})(\d{4});(0\d{3})(\d{2,6});(\d{3})(\d{3})(\d{3,4});(\d{4})(\d{4});(\d{3})(\d{4})(\d{4}) $1 $2 $3;$1 $2 $3;$1 $2;$1 $2 $3;$1 $2;$1 $2 $3;$1 $2;$1 $2 $3;$1 $2;$1 $2 $3 0[26]|55;0[26];0[26];0[13-57-9][0159];0[13-57-9][0159]|8(?:03|4[17]|9[245])#0[13-57-9][0159]|8(?:03|4[17]|9(?:2|[45][0-4]));0[13-57-9][2-46-8];0[13-57-9][2-46-8];[13]|8(?:00|4[08]|9[59])#[13]|8(?:00|4[08]|9(?:5[5-9]|9));894#894[5-9];3 X Italy
7 | AX Åland 358 999 6,7,8,9,10,11 0 X X Åland Islands
8 | AS American Samoa 1 544 10 0,1 X X American Samoa
9 | AD Andorra 376 213 6 0 X (\d{3})(\d{3});(180[02])(\d{4}) $1 $2;$1 $2 [346-9];1 X Andorra
10 | AO Angola 244 631 9 0 X (\d{3})(\d{3})(\d{3}) $1 $2 $3 N/A X Angola
11 | AI Anguilla 1 365 10 0,1 X X Anguilla
12 | AG Antigua and Barbuda 1 344 10 0,1 X X Antigua and Barbuda
13 | AR Argentina 54 722 10,11 0 X ([68]\d{2})(\d{3})(\d{4});(\d{2})(\d{4});(\d{3})(\d{4});(\d{4})(\d{4});(9)(11)(\d{4})(\d{4});(9)(\d{3})(\d{3})(\d{4});(9)(\d{4})(\d{2})(\d{4});(11)(\d{4})(\d{4});(\d{3})(\d{3})(\d{4});(\d{4})(\d{2})(\d{4});(\d{3}) $1-$2-$3;$1-$2;$1-$2;$1-$2;$1 $2 $3-$4;$1 $2 $3-$4;$1 $2 $3-$4;$1 $2-$3;$1 $2-$3;$1 $2-$3;$1 [68];[2-9];[2-9];[2-9];911;9(?:2[234689]|3[3-8])#9(?:2(?:2[013]|3[067]|49|6[01346]|80|9[147-9])|3(?:36|4[1-358]|5[138]|6[24]|7[069]|8[013578]))#9(?:2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3[456]|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45])))#9(?:2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3(?:4|5[014]|6[1239])|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45])));9[23];1;2(?:2[013]|3[067]|49|6[01346]|80|9[147-9])|3(?:36|4[1-358]|5[138]|6[24]|7[069]|8[013578])#2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3[456]|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45]))#2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3(?:4|5[014]|6[1239])|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45]));[23];1[012]|911 X Argentina
14 | AW Aruba 297 363 7 0 X (\d{3})(\d{4}) $1 $2 N/A X Aruba
15 | AC Ascension Island 247 999 4 0 X X Ascension Island
16 | AU Australia 61 505 9 0 X ([2378])(\d{4})(\d{4});(\d{3})(\d{3})(\d{3});(16)(\d{3})(\d{2,4});(1[389]\d{2})(\d{3})(\d{3});(180)(2\d{3});(19\d)(\d{3});(19\d{2})(\d{4});(13)(\d{2})(\d{2}) $1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2;$1 $2;$1 $2;$1 $2 $3 [2378];[45]|14;16;1(?:[38]0|90)#1(?:[38]00|90);180#1802;19[13];19[67];13[1-9] X Australia
17 | AZ Azərbaycan 994 400 9 0 X (\d{2})(\d{3})(\d{2})(\d{2});(\d{2})(\d{3})(\d{2})(\d{2});(\d{3})(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4;$1 $2 $3 $4;$1 $2 $3 $4 (?:1[28]|2(?:[45]2|[0-36])|365);[4-8];9 X Azerbaijan
18 | BS Bahamas 1 364 10 0,1 X X Bahamas
19 | BB Barbados 1 342 10 0,1 X X Barbados
20 | BE België 32 206 9 0 X (\d{3})(\d{2})(\d{2})(\d{2});(\d)(\d{3})(\d{2})(\d{2});(\d{2})(\d{2})(\d{2})(\d{2});(\d{3})(\d{2})(\d{3}) $1 $2 $3 $4;$1 $2 $3 $4;$1 $2 $3 $4;$1 $2 $3 4[6-9];[23]|4[23]|9[2-4];[156]|7[018]|8(?:0[1-9]|[1-79]);(?:80|9)0 X Belgium
21 | BZ Belize 501 702 7 X (\d{3})(\d{4});(0)(800)(\d{4})(\d{3}) $1-$2;$1-$2-$3-$4 [2-8];0 X Belize
22 | BJ Bénin 229 616 8 0 X (\d{2})(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4 N/A X Benin
23 | BM Bermuda 1 350 10 0,1 X X Bermuda
24 | BO Bolivia 591 736 8 0 X ([234])(\d{7});([67]\d{7}) $1 $2;$1 [234];[67] X Bolivia
25 | BA Bosna i Hercegovina 387 218 8,9 0 X (\d{2})(\d{3})(\d{3});(\d{2})(\d{3})(\d{3});(\d{2})(\d{2})(\d{2})(\d{3}) $1 $2-$3;$1 $2 $3;$1 $2 $3 $4 [3-5];6[1-356]|[7-9];6[047] X Bosnia and Herzegovina
26 | BW Botswana 267 652 8 0 X (\d{3})(\d{4});(7\d)(\d{3})(\d{3});(90)(\d{5}) $1 $2;$1 $2 $3;$1 $2 [2-6];7;9 X Botswana
27 | IO British Indian Ocean Territory 246 999 7 0 X (\d{3})(\d{4}) $1 $2 N/A X British Indian Ocean Territory
28 | VG British Virgin Islands 1 348 10 0,1 X X British Virgin Islands
29 | BN Brunei 673 528 7 0 X ([2-578]\d{2})(\d{4}) $1 $2 N/A X Brunei
30 | BF Burkina Faso 226 613 8 0 X (\d{2})(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4 N/A X Burkina Faso
31 | BI Burundi 257 642 8 0 X (\d{2})(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4 N/A X Burundi
32 | CV Cabo Verde 238 625 7 0 X (\d{3})(\d{2})(\d{2}) $1 $2 $3 N/A X Cape Verde
33 | CM Cameroon 237 624 8,9 0 X ([26])(\d{2})(\d{2})(\d{2})(\d{2});(\d{2})(\d{2})(\d{2})(\d{2});(800)(\d{2})(\d{3}) $1 $2 $3 $4 $5;$1 $2 $3 $4;$1 $2 $3 [26];[23]|88;80 X Cameroon
34 | CA Canada 1 302 10 0,1 X X Canada
35 | BQ Caribisch Nederland 599 362 7,8 0 X X Caribbean Netherlands
36 | KY Cayman Islands 1 346 10 0,1 X X Cayman Islands
37 | CZ Česká republika 420 230 9 0 X ([2-9]\d{2})(\d{3})(\d{3});(96\d)(\d{3})(\d{3})(\d{3});(9\d)(\d{3})(\d{3})(\d{3}) $1 $2 $3;$1 $2 $3 $4;$1 $2 $3 $4 [2-8]|9[015-7];96;9[36] X Czech Republic
38 | CL Chile 56 730 9 0 X (\d)(\d{4})(\d{4});(\d{2})(\d{3})(\d{4});(9)(\d{4})(\d{4});(44)(\d{3})(\d{4});([68]00)(\d{3})(\d{3,4});(600)(\d{3})(\d{2})(\d{3});(1230)(\d{3})(\d{4});(\d{5})(\d{4});(\d{4,5}) $1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3 $4;$1 $2 $3;$1 $2;$1 2[23];[357]|4[1-35]|6[13-57];9;44;60|8;60;1;219;[1-9] X Chile
39 | CX Christmas Island 61 999 9 0 X X Christmas Island
40 | VA Città del Vaticano 379 225 10 X X Vatican City
41 | CO Colombia 57 732 10 0 X (\d)(\d{7});(\d{3})(\d{7});(1)(\d{3})(\d{7}) $1 $2;$1 $2;$1 $2 $3 1(?:8[2-9]|9[0-3]|[2-7])|[24-8]#1(?:8[2-9]|9(?:09|[1-3])|[2-7])|[24-8];3;1(?:80|9[04])#1(?:800|9(?:0[01]|4[78])) X Colombia
42 | CG Congo-Brazzaville 242 629 9 X (\d{2})(\d{3})(\d{4});(\d)(\d{4})(\d{4}) $1 $2 $3;$1 $2 $3 [02];8 X Congo - Brazzaville
43 | CD Congo-Kinshasa 243 630 9 0 X (\d{2})(\d{3})(\d{4});([89]\d{2})(\d{3})(\d{3});(\d{2})(\d{2})(\d{3});(\d{2})(\d{5}) $1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 12;8[0-2459]|9;88;[1-6] X Congo - Kinshasa
44 | CK Cook Islands 682 548 5 0 X (\d{2})(\d{3}) $1 $2 N/A X Cook Islands
45 | CR Costa Rica 506 712 8 0 X (\d{4})(\d{4});(\d{3})(\d{3})(\d{4}) $1 $2;$1-$2-$3 [24-7]|8[3-9];[89]0 X Costa Rica
46 | CI Côte d’Ivoire 225 612 8 X (\d{2})(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4 N/A X Côte d’Ivoire
47 | CU Cuba 53 368 8 0 X (\d)(\d{6,7});(\d{2})(\d{4,6});(\d)(\d{7}) $1 $2;$1 $2;$1 $2 7;[2-4];5 X Cuba
48 | CW Curaçao 599 362 7,8 0 X (\d{3})(\d{4});(9)(\d{3})(\d{4}) $1 $2;$1 $2 $3 [13-7];9 X Curaçao
49 | DK Danmark 45 238 8 0 X (\d{2})(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4 N/A X Denmark
50 | DJ Djibouti 253 638 8 0 X (\d{2})(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4 N/A X Djibouti
51 | DM Dominica 1 366 10 0,1 X X Dominica
52 | EC Ecuador 593 740 8,9 0 X (\d)(\d{3})(\d{4});(\d{2})(\d{3})(\d{4});(1800)(\d{3})(\d{3,4}) $1-$2-$3;$1 $2 $3;$1 $2 $3 [247]|[356][2-8];9;1 X Ecuador
53 | EE Eesti 372 248 7,8 0 X ([3-79]\d{2})(\d{4});(70)(\d{2})(\d{4});(8000)(\d{3})(\d{3});([458]\d{3})(\d{3,4}) $1 $2;$1 $2 $3;$1 $2 $3;$1 $2 [369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]#[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9];70;800#8000;40|5|8(?:00|[1-5])#40|5|8(?:00[1-9]|[1-5]) X Estonia
54 | SV El Salvador 503 706 8 0 X (\d{4})(\d{4});(\d{3})(\d{4});(\d{3})(\d{4})(\d{4}) $1 $2;$1 $2;$1 $2 $3 [267];[89];[89] X El Salvador
55 | ER Eretria 291 657 7 0 X (\d)(\d{3})(\d{3}) $1 $2 $3 N/A X Eritrea
56 | FK Falkland Islands 500 750 5 0 X X Falkland Islands
57 | FJ Fiji 679 542 7 X (\d{3})(\d{4});(\d{4})(\d{3})(\d{4}) $1 $2;$1 $2 $3 [36-9];0 X Fiji
58 | FO Føroyar 298 288 6 0 X (\d{6}) $1 N/A X Faroe Islands
59 | FR France 33 208 9 0 X ([1-79])(\d{2})(\d{2})(\d{2})(\d{2});(1\d{2})(\d{3});(8\d{2})(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4 $5;$1 $2;$1 $2 $3 $4 [1-79];11;8 X France
60 | GA Gabon 241 628 8 X (\d)(\d{2})(\d{2})(\d{2});(\d{2})(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4;$1 $2 $3 $4 [2-7];0 X Gabon
61 | GM Gambia 220 607 7 0 X (\d{3})(\d{4}) $1 $2 N/A X Gambia
62 | GH Ghana 233 620 9 0 X (\d{2})(\d{3})(\d{4});(\d{3})(\d{5}) $1 $2 $3;$1 $2 [235];8 X Ghana
63 | GI Gibraltar 350 266 8 0 X (\d{3})(\d{5}) $1 $2 2 X Gibraltar
64 | GD Grenada 1 352 10 0,1 X X Grenada
65 | GP Guadeloupe 590 340 9 0 X ([56]90)(\d{2})(\d{4}) $1 $2-$3 N/A X Guadeloupe
66 | GU Guam 1 535 10 0,1 X X Guam
67 | GT Guatemala 502 704 8 0 X (\d{4})(\d{4});(\d{4})(\d{3})(\d{4}) $1 $2;$1 $2 $3 [2-7];1 X Guatemala
68 | GG Guernsey 44 234,235 10 0 X X Guernsey
69 | GW Guiné Bissau 245 632 7,9 0 X (\d{3})(\d{3})(\d{3}) $1 $2 $3 44|9[567] X Guinea-Bissau
70 | GQ Guinea Ecuatorial 240 627 9 0 X (\d{3})(\d{3})(\d{3});(\d{3})(\d{6}) $1 $2 $3;$1 $2 [235];[89] X Equatorial Guinea
71 | GN Guinée 224 611 8,9 0 X (\d{2})(\d{2})(\d{2})(\d{2});(\d{3})(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4;$1 $2 $3 $4 3;[67] X Guinea
72 | GY Guyana 592 738 7 0 X (\d{3})(\d{4}) $1 $2 N/A X Guyana
73 | GF Guyane française 594 742 9 0 X (\d{3})(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4 N/A X French Guiana
74 | HT Haïti 509 372 8 0 X (\d{2})(\d{2})(\d{4}) $1 $2 $3 N/A X Haiti
75 | HN Honduras 504 708 8 0 X (\d{4})(\d{4}) $1-$2 N/A X Honduras
76 | HR Hrvatska 385 219 8,9 0 X (1)(\d{4})(\d{3});(6[09])(\d{4})(\d{3});([67]2)(\d{3})(\d{3,4});([2-5]\d)(\d{3})(\d{3,4});(9\d)(\d{3})(\d{3,4});(9\d)(\d{4})(\d{4});(9\d)(\d{3,4})(\d{3})(\d{3});(\d{2})(\d{2})(\d{2,3});(\d{2})(\d{3,4})(\d{3});(80[01])(\d{2})(\d{2,3});(80[01])(\d{3,4})(\d{3}) $1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3 $4;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3 1;6[09];[67]2;[2-5];9;9;9;6[0145]|7;6[0145]|7;8;8 X Croatia
77 | ZA i-South Africa 27 655 9 0 X (860)(\d{3})(\d{3});(\d{2})(\d{3})(\d{4});(\d{2})(\d{3,4});(\d{2})(\d{3})(\d{2,3}) $1 $2 $3;$1 $2 $3;$1 $2;$1 $2 $3 860;[1-79]|8(?:[0-47]|6[1-9]);8[1-4];8[1-4] X South Africa
78 | ID Indonesia 62 510 9,10,11,12 0 X (\d{2})(\d{5,8});(\d{3})(\d{5,8});(8\d{2})(\d{3,4})(\d{3,5});(1)(500)(\d{3});(177)(\d{6,8});(800)(\d{5,7});(804)(\d{3})(\d{4});(80\d)(\d)(\d{3})(\d{3}) $1 $2;$1 $2;$1-$2-$3;$1 $2 $3;$1 $2;$1 $2;$1 $2 $3;$1 $2 $3 $4 2[124]|[36]1;[4579]|2[035-9]|[36][02-9];8[1-35-9];15;17;800;804;80[79] X Indonesia
79 | IE Ireland 353 272 9 0 X (1)(\d{3,4})(\d{4});(\d{2})(\d{5});(\d{3})(\d{5});(48)(\d{4})(\d{4});(818)(\d{3})(\d{3});(\d{2})(\d{3})(\d{3,4});([78]\d)(\d{3,4})(\d{4});(700)(\d{3})(\d{3});(\d{4})(\d{3})(\d{3}) $1 $2 $3;$1 $2;$1 $2;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3 1;2[24-9]|47|58|6[237-9]|9[35-9];40[24]|50[45];48;81;[24-69]|7[14];76|8[35-9];70;1(?:8[059]|5)#1(?:8[059]0|5) X Ireland
80 | IS Ísland 354 274 7,8,9 0 X (\d{3})(\d{4});(3\d{2})(\d{3})(\d{3}) $1 $2;$1 $2 $3 [4-9];3 X Iceland
81 | IM Isle of Man 44 234,235 10 0 X X Isle of Man
82 | JM Jamaica 1 338 10 0,1 X X Jamaica
83 | JE Jersey 44 234,235 10 0 X X Jersey
84 | GL Kalaallit Nunaat 299 290 6 0 X (\d{2})(\d{2})(\d{2}) $1 $2 $3 N/A X Greenland
85 | KE Kenya 254 639 9 0 X (\d{2})(\d{5,7});(\d{3})(\d{6});(\d{3})(\d{3})(\d{3,4}) $1 $2;$1 $2;$1 $2 $3 [24-6];7;[89] X Kenya
86 | CC Kepulauan Cocos (Keeling) 61 999 9 0 X X Cocos (Keeling) Islands
87 | KI Kiribati 686 545 8 0 X X Kiribati
88 | RE La Réunion 262 647 9 0 X ([268]\d{2})(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4 N/A X Réunion
89 | LV Latvija 371 247 8 0 X ([2689]\d)(\d{3})(\d{3}) $1 $2 $3 N/A X Latvia
90 | LS Lesotho 266 651 8 0 X (\d{4})(\d{4}) $1 $2 N/A X Lesotho
91 | LR Liberia 231 618 7,8,9 0 X (2\d)(\d{3})(\d{3});(\d{3})(\d{3})(\d{3});([4-6])(\d{3})(\d{3});(\d{2})(\d{3})(\d{4}) $1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3 2;[2579];[4-6];[38] X Liberia
92 | LI Liechtenstein 423 295 7 0 X (\d{3})(\d{2})(\d{2});(\d{3})(\d{3})(\d{3});(69)(7\d{2})(\d{4}) $1 $2 $3;$1 $2 $3;$1 $2 $3 [23789];6[56];697 X Liechtenstein
93 | LT Lietuva 370 246 8 0,8 X ([34]\d)(\d{6});([3-6]\d{2})(\d{5});([7-9]\d{2})(\d{2})(\d{3});(5)(2\d{2})(\d{4}) $1 $2;$1 $2;$1 $2 $3;$1 $2 $3 37|4(?:1|5[45]|6[2-4]);3[148]|4(?:[24]|6[09])|528|6;[7-9];52[0-79] X Lithuania
94 | LU Luxemburg 352 270 9 0 X (\d{2})(\d{3});(\d{2})(\d{2})(\d{2});(\d{2})(\d{2})(\d{3});(\d{2})(\d{2})(\d{2})(\d{1,2});(\d{2})(\d{2})(\d{2})(\d{3});(\d{2})(\d{2})(\d{2})(\d{2})(\d{1,2});(\d{2})(\d{2})(\d{2})(\d{1,4});(\d{3})(\d{2})(\d{3});(\d{3})(\d{3})(\d{3}) $1 $2;$1 $2 $3;$1 $2 $3;$1 $2 $3 $4;$1 $2 $3 $4;$1 $2 $3 $4 $5;$1 $2 $3 $4;$1 $2 $3;$1 $2 $3 [2-5]|7[1-9]|[89](?:[1-9]|0[2-9]);[2-5]|7[1-9]|[89](?:[1-9]|0[2-9]);20;2(?:[0367]|4[3-8]);20;2(?:[0367]|4[3-8]);2(?:[12589]|4[12])|[3-5]|7[1-9]|8(?:[1-9]|0[2-9])|9(?:[1-9]|0[2-46-9]);70|80[01]|90[015];6 X Luxembourg
95 | MG Madagascar 261 646 9 0 X ([23]\d)(\d{2})(\d{3})(\d{2}) $1 $2 $3 $4 N/A X Madagascar
96 | HU Magyarország 36 216 9 0 X (1)(\d{3})(\d{4});(\d{2})(\d{3})(\d{3,4}) $1 $2 $3;$1 $2 $3 1;[2-9] X Hungary
97 | MW Malawi 265 650 9 0 X (\d)(\d{3})(\d{3});(2\d{2})(\d{3})(\d{3});(\d{3})(\d{2})(\d{2})(\d{2}) $1 $2 $3;$1 $2 $3;$1 $2 $3 $4 1;2;[1789] X Malawi
98 | MY Malaysia 60 502 9,10 0 X ([4-79])(\d{3})(\d{4});(3)(\d{4})(\d{4});([18]\d)(\d{3})(\d{3,4});(1)([36-8]00)(\d{2})(\d{4});(11)(\d{4})(\d{4});(15[49])(\d{3})(\d{4}) $1-$2 $3;$1-$2 $3;$1-$2 $3;$1-$2-$3-$4;$1-$2 $3;$1-$2 $3 [4-79];3;1[02-46-9][1-9]|8;1[36-8]0;11;15 X Malaysia
99 | MV Maldives 960 472 7 0 X (\d{3})(\d{4});(\d{3})(\d{3})(\d{4}) $1-$2;$1 $2 $3 [3467]|9(?:[1-9]|0[1-9]);900 X Maldives
100 | ML Mali 223 610 8 0 X (\d{2})(\d{2})(\d{2})(\d{2});(\d{4}) $1 $2 $3 $4;$1 [246-9];67|74 X Mali
101 | MT Malta 356 278 8 0 X (\d{4})(\d{4}) $1 $2 N/A X Malta
102 | MH Marshall Islands 692 551 7 0,1 X (\d{3})(\d{4}) $1-$2 N/A X Marshall Islands
103 | MQ Martinique 596 340 9 0 X (\d{3})(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4 N/A X Martinique
104 | MU Mauritius 230 617 7,8 0 X ([2-46-9]\d{2})(\d{4});(5\d{3})(\d{4}) $1 $2;$1 $2 [2-46-9];5 X Mauritius
105 | YT Mayotte 262 654 9 0 X X Mayotte
106 | FM Micronesia 691 550 7 0 X (\d{3})(\d{4}) $1 $2 N/A X Micronesia
107 | MZ Moçambique 258 643 9 0 X ([28]\d)(\d{3})(\d{3,4});(80\d)(\d{3})(\d{3}) $1 $2 $3;$1 $2 $3 2|8[2-7];80 X Mozambique
108 | MC Monaco 377 212 8,9 0 X (\d{2})(\d{2})(\d{2})(\d{2});(\d{2})(\d{3})(\d{3});(6)(\d{2})(\d{2})(\d{2})(\d{2});(\d{3})(\d{3})(\d{2}) $1 $2 $3 $4;$1 $2 $3;$1 $2 $3 $4 $5;$1 $2 $3 9;4;6;8 X Monaco
109 | MS Montserrat 1 354 10 0,1 X X Montserrat
110 | NA Namibia 264 649 9 0 X (8\d)(\d{3})(\d{4});(6\d)(\d{3})(\d{3,4});(88)(\d{3})(\d{3});(870)(\d{3})(\d{3}) $1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3 8[1235];6;88;870 X Namibia
111 | NR Nauru 674 536 7 0 X (\d{3})(\d{4}) $1 $2 N/A X Nauru
112 | NL Nederland 31 204 9 0 X ([1-578]\d)(\d{3})(\d{4});([1-5]\d{2})(\d{3})(\d{3});(6)(\d{8});(66)(\d{7});(14)(\d{3,4});([89]0\d)(\d{4,7}) $1 $2 $3;$1 $2 $3;$1 $2;$1 $2;$1 $2;$1 $2 1[035]|2[0346]|3[03568]|4[0356]|5[0358]|7|8[4578];1[16-8]|2[259]|3[124]|4[17-9]|5[124679];6[0-57-9];66;14;80|9 X Netherlands
113 | NZ New Zealand 64 530 8,9,10 0 X ([34679])(\d{3})(\d{4});(24099)(\d{3});(\d{2})(\d{3})(\d{3});(\d{2})(\d{3})(\d{3,5});(2\d)(\d{3,4})(\d{4});(\d{3})(\d{3})(\d{3,4}) $1-$2 $3;$1 $2;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3 [346]|7[2-57-9]|9[1-9];240#2409#24099;21;2(?:1[1-9]|[69]|7[0-35-9])|70|86;2[028];2(?:10|74)|5|[89]0 X New Zealand
114 | NI Nicaragua 505 710 8 0 X (\d{4})(\d{4}) $1 $2 N/A X Nicaragua
115 | NE Niger 227 614 8 X (\d{2})(\d{2})(\d{2})(\d{2});(08)(\d{3})(\d{3}) $1 $2 $3 $4;$1 $2 $3 [289]|09;08 X Niger
116 | NG Nigeria 234 621 10 0 X (\d{3})(\d{3})(\d{3,4});(\d)(\d{3})(\d{3,4});(\d{2})(\d{3})(\d{2,3});([78]00)(\d{4})(\d{4,5});([78]00)(\d{5})(\d{5,6});(78)(\d{2})(\d{3}) $1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3 70|8[01]|90[23589];[12]|9(?:0[3-9]|[1-9]);[3-6]|7(?:[1-79]|0[1-9])|8[2-9];[78]00;[78]00;78 X Nigeria
117 | NU Niue 683 553 4 0 X X Niue
118 | NF Norfolk Island 672 999 5,6 0 X (\d{2})(\d{4});(\d)(\d{5}) $1 $2;$1 $2 1;3 X Norfolk Island
119 | NO Norge 47 242 8 X ([489]\d{2})(\d{2})(\d{3});([235-7]\d)(\d{2})(\d{2})(\d{2}) $1 $2 $3;$1 $2 $3 $4 [489];[235-7] X Norway
120 | MP Northern Mariana Islands 1 534 10 0,1 X X Northern Mariana Islands
121 | NC Nouvelle-Calédonie 687 546 6 0 X (\d{2})(\d{2})(\d{2}) $1.$2.$3 [2-46-9]|5[0-4] X New Caledonia
122 | UZ Oʻzbekiston 998 434 7,8,9 0,8 X ([679]\d)(\d{3})(\d{2})(\d{2}) $1 $2 $3 $4 N/A X Uzbekistan
123 | AT Österreich 43 232 10,11,12,13 0 X (116\d{3});(1)(\d{3,12});(5\d)(\d{3,5});(5\d)(\d{3})(\d{3,4});(5\d)(\d{4})(\d{4,7});(\d{3})(\d{3,10});(\d{4})(\d{3,9}) $1;$1 $2;$1 $2;$1 $2 $3;$1 $2 $3;$1 $2;$1 $2 116;1;5[079];5[079];5[079];316|46|51|732|6(?:5[0-3579]|[6-9])|7(?:[28]0)|[89];2|3(?:1[1-578]|[3-8])|4[2378]|5[2-6]|6(?:[12]|4[1-9]|5[468])|7(?:2[1-8]|35|4[1-8]|[5-79]) X Austria
124 | PW Palau 680 552 7 0 X (\d{3})(\d{4}) $1 $2 N/A X Palau
125 | PA Panamá 507 714 8 0 X (\d{3})(\d{4});(\d{4})(\d{4}) $1-$2;$1-$2 [1-57-9];6 X Panama
126 | PG Papua New Guinea 675 537 7,8 0 X (\d{3})(\d{4});(\d{4})(\d{4}) $1 $2;$1 $2 [13-689]|27;20|7 X Papua New Guinea
127 | PY Paraguay 595 744 9 0 X (\d{2})(\d{5,7});(\d{3})(\d{3,6});(\d{3})(\d{6});(\d{2})(\d{3})(\d{4});(\d{3})(\d{4,6}) $1 $2;$1 $2;$1 $2;$1 $2 $3;$1 $2 (?:[26]1|3[289]|4[124678]|7[123]|8[1236]);[2-9]0;9[1-9];8700;[2-8][1-9] X Paraguay
128 | PE Perú 51 716 9 0 X (1)(\d{7});([4-8]\d)(\d{6});(\d{3})(\d{5});(9\d{2})(\d{3})(\d{3}) $1 $2;$1 $2;$1 $2;$1 $2 $3 1;[4-7]|8[2-4];80;9 X Peru
129 | PH Philippines 63 515 10 0 X (2)(\d{3})(\d{4});(2)(\d{5});(\d{4})(\d{4,6});(\d{5})(\d{4});([3-8]\d)(\d{3})(\d{4});(\d{3})(\d{3})(\d{4});(1800)(\d{3})(\d{4});(1800)(\d{1,2})(\d{3})(\d{4}) $1 $2 $3;$1 $2;$1 $2;$1 $2;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3 $4 2;2;3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|5(?:22|44)|642|8(?:62|8[245])#3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]));346|4(?:27|9[35])|883#3469|4(?:279|9(?:30|56))|8834;[3-8];81|9;1;1 X Philippines
130 | PL Polska 48 260 9 0 X (\d{2})(\d{3})(\d{2})(\d{2});(\d{2})(\d{1})(\d{4});(\d{3})(\d{3})(\d{3});(\d{3})(\d{2})(\d{2,3});(\d{3})(\d{3}) $1 $2 $3 $4;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 [14]|2[0-57-9]|3[2-4]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145];[12]2;26|39|5[0137]|6[0469]|7[02389]|8[08];64;64 X Poland
131 | PF Polynésie française 689 547 6,8 0 X (\d{2})(\d{2})(\d{2})(\d{2});(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4;$1 $2 $3 4[09]|8[79];44 X French Polynesia
132 | PT Portugal 351 268 9 0 X (2\d)(\d{3})(\d{4});([2-46-9]\d{2})(\d{3})(\d{3}) $1 $2 $3;$1 $2 $3 2[12];2[3-9]|[346-9] X Portugal
133 | PR Puerto Rico 1 330 10 0,1 X X Puerto Rico
134 | DO República Dominicana 1 370 10 0,1 X X Dominican Republic
135 | MD Republica Moldova 373 259 8 0 X (\d{2})(\d{3})(\d{3});([25-7]\d{2})(\d{2})(\d{3});([89]\d{2})(\d{5}) $1 $2 $3;$1 $2 $3;$1 $2 22|3;2[13-79]|[5-7];[89] X Moldova
136 | CF République centrafricaine 236 623 8 0 X (\d{2})(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4 N/A X Central African Republic
137 | RO România 40 226 9 0 X (\d{2})(\d{3})(\d{4});(21)(\d{4});(\d{3})(\d{3})(\d{3});(2\d{2})(\d{3}) $1 $2 $3;$1 $2;$1 $2 $3;$1 $2 [23]1;21;[23][3-7]|[7-9];2[3-6] X Romania
138 | RW Rwanda 250 635 9 X (2\d{2})(\d{3})(\d{3});([7-9]\d{2})(\d{3})(\d{3});(0\d)(\d{2})(\d{2})(\d{2}) $1 $2 $3;$1 $2 $3;$1 $2 $3 $4 2;[7-9];0 X Rwanda
139 | SH Saint Helena 290 999 4,5 0 X X Saint Helena
140 | KN Saint Kitts and Nevis 1 356 10 0,1 X X Saint Kitts and Nevis
141 | LC Saint Lucia 1 358 10 0,1 X X Saint Lucia
142 | BL Saint-Barthélemy 590 340 9 0 X X Saint Barthélemy
143 | MF Saint-Martin (partie française) 590 340 9 0 X X Saint Martin
144 | PM Saint-Pierre-et-Miquelon 508 308 6 0 X ([45]\d)(\d{2})(\d{2}) $1 $2 $3 N/A X Saint Pierre and Miquelon
145 | WS Samoa 685 549 6,7 0 X (8\d{2})(\d{3,4});(7\d)(\d{5});(\d{5}) $1 $2;$1 $2;$1 8;7;[2-6] X Samoa
146 | SM San Marino 378 292 8 X (\d{2})(\d{2})(\d{2})(\d{2});(0549)(\d{6});(\d{6}) $1 $2 $3 $4;($1) $2;(0549) $1 [5-7];0;[89] X San Marino
147 | ST São Tomé e Príncipe 239 626 7 0 X (\d{3})(\d{4}) $1 $2 N/A X São Tomé and Príncipe
148 | CH Schweiz 41 228 9 0 X ([2-9]\d)(\d{3})(\d{2})(\d{2});([89]\d{2})(\d{3})(\d{3});(\d{3})(\d{2})(\d{3})(\d{2})(\d{2}) $1 $2 $3 $4;$1 $2 $3;$1 $2 $3 $4 $5 [2-7]|[89]1;8[047]|90;860 X Switzerland
149 | SN Sénégal 221 608 9 0 X (\d{2})(\d{3})(\d{2})(\d{2});(\d{3})(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4;$1 $2 $3 $4 [379];8 X Senegal
150 | SC Seychelles 248 633 7 0 X (\d{3})(\d{3});(\d)(\d{3})(\d{3}) $1 $2;$1 $2 $3 8;[246] X Seychelles
151 | AL Shqipëri 355 276 9 0 X (4)(\d{3})(\d{4});(6[6-9])(\d{3})(\d{4});(\d{2})(\d{3})(\d{3});(\d{3})(\d{3,5}) $1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 4[0-6];6;[2358][2-5]|4[7-9];[235][16-9]|8[016-9]|[79] X Albania
152 | SL Sierra Leone 232 619 8 0 X (\d{2})(\d{6}) $1 $2 N/A X Sierra Leone
153 | SG Singapore 65 525 8 0 X ([3689]\d{3})(\d{4});(1[89]00)(\d{3})(\d{4});(7000)(\d{4})(\d{3});(800)(\d{3})(\d{4}) $1 $2;$1 $2 $3;$1 $2 $3;$1 $2 $3 [369]|8[1-9];1[89];70;80 X Singapore
154 | SX Sint-Maarten 1 362 10 0,1 X X Sint Maarten
155 | SI Slovenija 386 293 8 0 X (\d)(\d{3})(\d{2})(\d{2});([3-7]\d)(\d{3})(\d{3});([89][09])(\d{3,6});([58]\d{2})(\d{5}) $1 $2 $3 $4;$1 $2 $3;$1 $2;$1 $2 [12]|3[24-8]|4[24-8]|5[2-8]|7[3-8];[37][01]|4[0139]|51|6;[89][09];59|8[1-3] X Slovenia
156 | SK Slovensko 421 231 9 0 X (2)(16)(\d{3,4});([3-5]\d)(16)(\d{2,3});(2)(\d{3})(\d{3})(\d{2});([3-5]\d)(\d{3})(\d{2})(\d{2});([689]\d{2})(\d{3})(\d{3});(9090)(\d{3}) $1 $2 $3;$1 $2 $3;$1/$2 $3 $4;$1/$2 $3 $4;$1 $2 $3;$1 $2 216;[3-5];2;[3-5];[689];9090 X Slovakia
157 | SB Solomon Islands 677 540 7 0 X (\d{2})(\d{5}) $1 $2 [7-9] X Solomon Islands
158 | SO Soomaaliya 252 637 8,9 0 X (\d)(\d{6});(\d)(\d{7});(\d{2})(\d{5,7});(90\d)(\d{3})(\d{3}) $1 $2;$1 $2;$1 $2;$1 $2 $3 2[0-79]|[13-5];24|[67];15|28|6[1-35-9]|799|9[2-9];90 X Somalia
159 | SS South Sudan 211 659 9 0 X (\d{3})(\d{3})(\d{3}) $1 $2 $3 N/A X South Sudan
160 | VC St. Vincent & Grenadines 1 360 10 0,1 X X St. Vincent & Grenadines
161 | FI Suomi 358 244 6,7,8,9,10,11 0 X (\d{3})(\d{3,7});(116\d{3});(\d{2})(\d{4,10});(\d)(\d{4,11}) $1 $2;$1;$1 $2;$1 $2 (?:[1-3]00|[6-8]0);116;[14]|2[09]|50|7[135];[25689][1-8]|3 X Finland
162 | SR Suriname 597 746 7 0 X (\d{3})(\d{3});(\d{2})(\d{2})(\d{2});(\d{3})(\d{4}) $1-$2;$1-$2-$3;$1-$2 [2-4]|5[2-58];56;59|[6-8] X Suriname
163 | SE Sverige 46 240 9 0 X (8)(\d{2,3})(\d{2,3})(\d{2});([1-69]\d)(\d{2,3})(\d{2})(\d{2});([1-469]\d)(\d{3})(\d{2});(\d{3})(\d{2})(\d{2})(\d{2});(\d{3})(\d{2,3})(\d{2});(7\d)(\d{3})(\d{2})(\d{2});(77)(\d{2})(\d{2});(20)(\d{2,3})(\d{2});(9[034]\d)(\d{2})(\d{2})(\d{3});(9[034]\d)(\d{4});(\d{3})(\d{2})(\d{3})(\d{2})(\d{2}) $1 $2 $3 $4;$1 $2 $3 $4;$1 $2 $3;$1 $2 $3 $4;$1 $2 $3;$1 $2 $3 $4;$1 $2 $3;$1 $2 $3;$1 $2 $3 $4;$1 $2;$1 $2 $3 $4 $5 8;1[013689]|2[0136]|3[1356]|4[0246]|54|6[03]|90;1[136]|2[136]|3[356]|4[0246]|6[03]|90;1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[0-5]|4[0-3]);1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[0-5]|4[0-3]);7;7;20;9[034];9[034];25[245]|67[3-6] X Sweden
164 | SZ Swaziland 268 653 8 X (\d{4})(\d{4}) $1 $2 [027] X Swaziland
165 | TZ Tanzania 255 640 9 0 X ([24]\d)(\d{3})(\d{4});([67]\d{2})(\d{3})(\d{3});([89]\d{2})(\d{2})(\d{4}) $1 $2 $3;$1 $2 $3;$1 $2 $3 [24];[67];[89] X Tanzania
166 | TD Tchad 235 622 8 0 X (\d{2})(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4 N/A X Chad
167 | TL Timor-Leste 670 514 8 0 X (\d{3})(\d{4});(\d{4})(\d{4}) $1 $2;$1 $2 [2-489];7 X Timor-Leste
168 | TG Togo 228 615 8 0 X (\d{2})(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4 N/A X Togo
169 | TK Tokelau 690 999 4,5,6,7 0 X X Tokelau
170 | TO Tonga 676 539 7 X (\d{2})(\d{3});(\d{3})(\d{4});(\d{4})(\d{3}) $1-$2;$1 $2;$1 $2 [1-6]|7[0-4]|8[05];7[5-9]|8[47-9];0 X Tonga
171 | TT Trinidad and Tobago 1 374 10 0,1 X X Trinidad and Tobago
172 | TR Türkiye 90 286 10 0 X (\d{3})(\d{3})(\d{4});(\d{3})(\d{3})(\d{4});(444)(\d{1})(\d{3}) $1 $2 $3;$1 $2 $3;$1 $2 $3 [23]|4(?:[0-35-9]|4[0-35-9]);[589];444 X Turkey
173 | TC Turks and Caicos Islands 1 376 10 0,1 X X Turks and Caicos Islands
174 | TV Tuvalu 688 999 6 0 X X Tuvalu
175 | VI U.S. Virgin Islands 1 332 10 0,1 X X U.S. Virgin Islands
176 | UG Uganda 256 641 9 0 X (\d{3})(\d{6});(\d{2})(\d{7});(2024)(\d{5}) $1 $2;$1 $2;$1 $2 [7-9]|20(?:[013-8]|2[5-9])|4(?:6[45]|[7-9]);3|4(?:[1-5]|6[0-36-9]);2024 X Uganda
177 | GB United Kingdom 44 234,235 10 0 X (\d{2})(\d{4})(\d{4});(\d{3})(\d{3})(\d{4});(\d{5})(\d{4,5});(1\d{3})(\d{5,6});(7\d{3})(\d{6});(800)(\d{4});(845)(46)(4\d);(8\d{2})(\d{3})(\d{4});(80\d)(\d{3})(\d{4});([58]00)(\d{6}) $1 $2 $3;$1 $2 $3;$1 $2;$1 $2;$1 $2;$1 $2;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 2|5[56]|7(?:0|6[013-9])#2|5[56]|7(?:0|6(?:[013-9]|2[0-35-9]));1(?:1|\d1)|3|9[018];1(?:38|5[23]|69|76|94)#1(?:387|5(?:24|39)|697|768|946)#1(?:3873|5(?:242|39[456])|697[347]|768[347]|9467);1;7(?:[1-5789]|62)#7(?:[1-5789]|624);800#8001#80011#800111#8001111;845#8454#84546#845464;8(?:4[2-5]|7[0-3]);80;[58]00 X United Kingdom
178 | US United States 1 310,311,312,313,314,315,316 10 0,1 X (\d{3})(\d{4});(\d{3})(\d{3})(\d{4}) $1-$2;($1) $2-$3 N/A;N/A X United States
179 | UY Uruguay 598 748 8 0 X (\d{4})(\d{4});(\d{2})(\d{3})(\d{3});(\d{3})(\d{4}) $1 $2;$1 $2 $3;$1 $2 [24];9[1-9];[89]0 X Uruguay
180 | VU Vanuatu 678 541 7 0 X (\d{3})(\d{4}) $1 $2 [579] X Vanuatu
181 | VE Venezuela 58 734 10 0 X (\d{3})(\d{7}) $1-$2 N/A X Venezuela
182 | VN Việt Nam 84 452 9,10 0 X ([17]99)(\d{4});([48])(\d{4})(\d{4});([235-7]\d)(\d{4})(\d{3});(80)(\d{5});(69\d)(\d{4,5});([235-7]\d{2})(\d{4})(\d{3});(9\d)(\d{3})(\d{2})(\d{2});(1[2689]\d)(\d{3})(\d{4});(1[89]00)(\d{4,6}) $1 $2;$1 $2 $3;$1 $2 $3;$1 $2;$1 $2;$1 $2 $3;$1 $2 $3 $4;$1 $2 $3;$1 $2 [17]99;[48];2[025-79]|3[0136-9]|5[2-9]|6[0-46-8]|7[02-79];80;69;2[1348]|3[25]|5[01]|65|7[18];9;1(?:[26]|8[68]|99);1[89]0 X Vietnam
183 | WF Wallis-et-Futuna 681 543 6 0 X (\d{2})(\d{2})(\d{2}) $1 $2 $3 N/A X Wallis and Futuna
184 | ZM Zambia 260 645 9 0 X ([29]\d)(\d{7});(800)(\d{3})(\d{3}) $1 $2;$1 $2 $3 [29];8 X Zambia
185 | ZW Zimbabwe 263 648 9,10 0 X ([49])(\d{3})(\d{2,4});(7\d)(\d{3})(\d{3,4});(86\d{2})(\d{3})(\d{3});([2356]\d{2})(\d{3,5});(\d{3})(\d{3})(\d{3,4});([1-356]\d)(\d{3,5});([235]\d)(\d{3})(\d{3,4});([25]\d{3})(\d{3,5});(8\d{3})(\d{6});(80\d)(\d{3})(\d{4}) $1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2;$1 $2 $3;$1 $2;$1 $2 $3;$1 $2;$1 $2;$1 $2 $3 4|9[2-9];7;86[24];2(?:0[45]|2[278]|[49]8|[78])|3(?:08|17|3[78]|7[1569]|8[37]|98)|5[15][78]|6(?:[29]8|[38]7|6[78]|75|[89]8);2(?:1[39]|2[0157]|6[14]|7[35]|84)|329;1[3-9]|2[0569]|3[0-69]|5[05689]|6[0-46-9];[23]9|54;(?:25|54)8#258[23]|5483;86;80 X Zimbabwe
186 | GR Ελλάδα 30 202 10 0 X ([27]\d)(\d{4})(\d{4});(\d{3})(\d{3})(\d{4});(2\d{3})(\d{6}) $1 $2 $3;$1 $2 $3;$1 $2 21|7;2[2-9]1|[689];2[2-9][02-9] X Greece
187 | CY Κύπρος 357 280 8 0 X (\d{2})(\d{6}) $1 $2 N/A X Cyprus
188 | BY Беларусь 375 257 9 0 X (\d{2})(\d{3})(\d{2})(\d{2});(\d{3})(\d{2})(\d{2})(\d{2});(\d{4})(\d{2})(\d{3});([89]\d{2})(\d{3})(\d{4});(82\d)(\d{4})(\d{4});(800)(\d{3});(800)(\d{2})(\d{2,4}) $1 $2-$3-$4;$1 $2-$3-$4;$1 $2-$3;$1 $2 $3;$1 $2 $3;$1 $2;$1 $2 $3 17[0-3589]|2[4-9]|[34]#17(?:[02358]|1[0-2]|9[0189])|2[4-9]|[34];1(?:5[24]|6[235]|7[467])|2(?:1[246]|2[25]|3[26])#1(?:5[24]|6(?:2|3[04-9]|5[0346-9])|7(?:[46]|7[37-9]))|2(?:1[246]|2[25]|3[26]);1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])#1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5]);8[01]|9;82;800;800 X Belarus
189 | BG България 359 284 9 0 X (2)(\d{5});(2)(\d{3})(\d{3,4});(\d{3})(\d{4});(\d{3})(\d{3})(\d{2});(\d{3})(\d{2})(\d{3});(\d{3})(\d{3})(\d{3});(\d{2})(\d{3})(\d{2,3});(\d{2})(\d{3})(\d{3,4}) $1 $2;$1 $2 $3;$1 $2;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3 29;2;43[124-7]|70[1-9];43[124-7]|70[1-9];[78]00;999;[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7];48|8[7-9]|9[08] X Bulgaria
190 | KG Кыргызстан 996 437 9 0 X (\d{3})(\d{3})(\d{3});(\d{4})(\d{5});(\d{3})(\d{3})(\d)(\d{3}) $1 $2 $3;$1 $2;$1 $2 $3 $4 [25-7]|31[25];3(?:1[36]|[2-9]);8 X Kyrgyzstan
191 | KZ Қазақстан 7 401 10 0,8 X X Kazakhstan
192 | MK Македонија 389 294 8 0 X (2)(\d{3})(\d{4});([347]\d)(\d{3})(\d{3});([58]\d{2})(\d)(\d{2})(\d{2}) $1 $2 $3;$1 $2 $3;$1 $2 $3 $4 2;[347];[58] X Macedonia
193 | MN Монгол 976 428 8 0 X ([12]\d)(\d{2})(\d{4});([12]2\d)(\d{5,6});([12]\d{3})(\d{5});(\d{4})(\d{4});([12]\d{4})(\d{4,5}) $1 $2 $3;$1 $2;$1 $2;$1 $2;$1 $2 [12]1;[12]2[1-3];[12](?:27|[3-5])#[12](?:27|[3-5]\d)2;[57-9];[12](?:27|[3-5])#[12](?:27|[3-5]\d)[4-9] X Mongolia
194 | RU Россия 7 250 10 0,8 X (\d{3})(\d{2})(\d{2});([3489]\d{2})(\d{3})(\d{2})(\d{2});(7\d{2})(\d{3})(\d{4}) $1-$2-$3;$1 $2-$3-$4;$1 $2 $3 [1-79];[34689];7 X Russia
195 | RS Србија 381 220 8,9 0 X ([23]\d{2})(\d{4,9});([1-3]\d)(\d{5,10});(6\d)(\d{6,8});([89]\d{2})(\d{3,9});(7[26])(\d{4,9});(7[08]\d)(\d{4,9}) $1 $2;$1 $2;$1 $2;$1 $2;$1 $2;$1 $2 (?:2[389]|39)0;1|2(?:[0-24-7]|[389][1-9])|3(?:[0-8]|9[1-9]);6;[89];7[26];7[08] X Serbia
196 | TJ Тоҷикистон 992 436 9 0 X ([349]\d{2})(\d{2})(\d{4});([459]\d)(\d{3})(\d{4});(331700)(\d)(\d{2});(\d{4})(\d)(\d{4}) $1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3 [34]7|91[78];4[48]|5|9(?:1[59]|[0235-9]);331#3317#33170#331700;3[1-5]#3(?:[1245]|3(?:[02-9]|1[0-589])) X Tajikistan
197 | TM Туркменистан 993 438 8 0,8 X (\d{2})(\d{2})(\d{2})(\d{2});(\d{2})(\d{6});(\d{3})(\d)(\d{2})(\d{2}) $1 $2-$3-$4;$1 $2;$1 $2-$3-$4 12;6;13|[2-5] X Turkmenistan
198 | UA Україна 380 255 9 0 X ([3-9]\d)(\d{3})(\d{4});([3-689]\d{2})(\d{3})(\d{3});([3-6]\d{3})(\d{5}) $1 $2 $3;$1 $2 $3;$1 $2 [38]9|4(?:[45][0-5]|87)|5(?:0|6[37]|7[37])|6[36-8]|73|9[1-9]#[38]9|4(?:[45][0-5]|87)|5(?:0|6(?:3[14-7]|7)|7[37])|6[36-8]|73|9[1-9];3[1-8]2|4[13678]2|5(?:[12457]2|6[24])|6(?:[49]2|[12][29]|5[24])|8[0-8]|90#3(?:[1-46-8]2[013-9]|52)|4(?:[1378]2|62[013-9])|5(?:[12457]2|6[24])|6(?:[49]2|[12][29]|5[24])|8[0-8]|90;3(?:5[013-9]|[1-46-8])|4(?:[137][013-9]|6|[45][6-9]|8[4-6])|5(?:[1245][013-9]|6[0135-9]|3|7[4-6])|6(?:[49][013-9]|5[0135-9]|[12][13-8])#3(?:5[013-9]|[1-46-8](?:22|[013-9]))|4(?:[137][013-9]|6(?:[013-9]|22)|[45][6-9]|8[4-6])|5(?:[1245][013-9]|6(?:3[02389]|[015689])|3|7[4-6])|6(?:[49][013-9]|5[0135-9]|[12][13-8]) X Ukraine
199 | ME Црна Гора 382 297 8,9 0 X (\d{2})(\d{3})(\d{3});(67)(9)(\d{3})(\d{3}) $1 $2 $3;$1 $2 $3 $4 [2-57-9]|6[036-9]#[2-57-9]|6(?:[03689]|7(?:[0-8]|9[3-9]));679#679[0-2] X Montenegro
200 | SJ Шпицберген и Ян-Майен 47 999 8 X X Svalbard and Jan Mayen
201 | GE საქართველო 995 282 9 0 X (\d{3})(\d{2})(\d{2})(\d{2});(\d{3})(\d{3})(\d{3});(\d{3})(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4;$1 $2 $3;$1 $2 $3 $4 [348];7;5 X Georgia
202 | AM Հայաստան 374 283 8 0 X (\d{2})(\d{6});(\d{2})(\d{6});(\d{3})(\d{5});(\d{3})(\d{2})(\d{3}) $1 $2;$1 $2;$1 $2;$1 $2 $3 1|47;4[139]|[5-7]|9[1-9];[23];8|90 X Armenia
203 | IL ישראל 972 425 9 0 X ([2-489])(\d{3})(\d{4});([57]\d)(\d{3})(\d{4});(1)([7-9]\d{2})(\d{3})(\d{3});(1255)(\d{3});(1200)(\d{3})(\d{3});(1212)(\d{2})(\d{2});(1599)(\d{6});(\d{4}) $1-$2-$3;$1-$2-$3;$1-$2-$3-$4;$1-$2;$1-$2-$3;$1-$2-$3;$1-$2;*$1 [2-489];[57];1[7-9];125;120;121;15;[2-689] X Israel
204 | AF افغانستان 93 412 9 0 X ([2-7]\d)(\d{3})(\d{4}) $1 $2 $3 [2-7] X Afghanistan
205 | PS الأراضي الفلسطينية 970 423 9 0 X ([2489])(2\d{2})(\d{4});(5[69]\d)(\d{3})(\d{3});(1[78]00)(\d{3})(\d{3}) $1 $2 $3;$1 $2 $3;$1 $2 $3 [2489];5;1[78] X Palestinian Territories
206 | JO الأردن 962 416 9 0 X (\d)(\d{3})(\d{4});(7)(\d{4})(\d{4});(\d{3})(\d{5,6}) $1 $2 $3;$1 $2 $3;$1 $2 [2356]|87;7[457-9];70|8[0158]|9 X Jordan
207 | AE الإمارات العربية المتحدة 971 424,430,431 9 0 X ([2-4679])(\d{3})(\d{4});(5[0256])(\d{3})(\d{4});([479]00)(\d)(\d{5});([68]00)(\d{2,9}) $1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 [2-4679][2-8];5;[479]0;60|8 X United Arab Emirates
208 | BH البحرين 973 426 8 0 X (\d{4})(\d{4}) $1 $2 N/A X Bahrain
209 | DZ الجزائر 213 603 9 0 X ([1-4]\d)(\d{2})(\d{2})(\d{2});([5-8]\d{2})(\d{2})(\d{2})(\d{2});(9\d)(\d{3})(\d{2})(\d{2}) $1 $2 $3 $4;$1 $2 $3 $4;$1 $2 $3 $4 [1-4];[5-8];9 X Algeria
210 | SD السودان 249 634 9 0 X (\d{2})(\d{3})(\d{4}) $1 $2 $3 N/A X Sudan
211 | IQ العراق 964 418 10 0 X (1)(\d{3})(\d{4});([2-6]\d)(\d{3})(\d{3,4});(7\d{2})(\d{3})(\d{4}) $1 $2 $3;$1 $2 $3;$1 $2 $3 1;[2-6];7 X Iraq
212 | KW الكويت 965 419 8 0 X (\d{4})(\d{3,4});(\d{3})(\d{5}) $1 $2;$1 $2 [126]|9[04-9]|52[25];5[015]|92 X Kuwait
213 | MA المغرب 212 604 9 0 X ([56]\d{2})(\d{6});([58]\d{3})(\d{5});(5\d{4})(\d{4});(8[09])(\d{7}) $1-$2;$1-$2;$1-$2;$1-$2 5(?:2[015-7]|3[0-4])|6;5(?:2[2-489]|3[5-9])|892#5(?:2(?:[2-48]|90)|3(?:[5-79]|80))|892;5(?:29|38)#5(?:29|38)[89];8(?:0|9[013-9]) X Morocco
214 | SA المملكة العربية السعودية 966 420 9 0 X ([1-467])(\d{3})(\d{4});(1\d)(\d{3})(\d{4});(5\d)(\d{3})(\d{4});(92\d{2})(\d{5});(800)(\d{3})(\d{4});(811)(\d{3})(\d{3,4}) $1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2;$1 $2 $3;$1 $2 $3 [1-467];1[1-467];5;92;80;81 X Saudi Arabia
215 | YE اليمن 967 421 9 0 X ([1-7])(\d{3})(\d{3,4});(7\d{2})(\d{3})(\d{3}) $1 $2 $3;$1 $2 $3 [1-6]|7[24-68];7[0137] X Yemen
216 | IR ایران 98 432 10 0 X (21)(\d{3,5});(\d{2})(\d{4})(\d{4});(\d{3})(\d{3})(\d{3,4});(\d{3})(\d{2})(\d{2,3});(\d{3})(\d{3}) $1 $2;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 21;[1-8];9;9;9 X Iran
217 | PK پاکستان 92 410 10 0 X (\d{2})(111)(\d{3})(\d{3});(\d{3})(111)(\d{3})(\d{3});(\d{2})(\d{7,8});(\d{3})(\d{6,7});(3\d{2})(\d{7});([15]\d{3})(\d{5,6});(586\d{2})(\d{5});([89]00)(\d{3})(\d{2}) $1 $2 $3 $4;$1 $2 $3 $4;$1 $2;$1 $2;$1 $2;$1 $2;$1 $2;$1 $2 $3 (?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)1#(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)11#(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)111;2[349]|45|54|60|72|8[2-5]|9[2-9]#(?:2[349]|45|54|60|72|8[2-5]|9[2-9])\d1#(?:2[349]|45|54|60|72|8[2-5]|9[2-9])\d11#(?:2[349]|45|54|60|72|8[2-5]|9[2-9])\d111;(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9];2[349]|45|54|60|72|8[2-5]|9[2-9]#(?:2[349]|45|54|60|72|8[2-5]|9[2-9])\d[2-9];3;58[12]|1;586;[89]00 X Pakistan
218 | TN تونس 216 605 8 0 X (\d{2})(\d{3})(\d{3}) $1 $2 $3 N/A X Tunisia
219 | KM جزر القمر 269 654 7 0 X (\d{3})(\d{2})(\d{2}) $1 $2 $3 N/A X Comoros
220 | SY سوريا 963 417 9 0 X (\d{2})(\d{3})(\d{3,4});(9\d{2})(\d{3})(\d{3}) $1 $2 $3;$1 $2 $3 [1-5];9 X Syria
221 | OM عُمان 968 422 8 0 X (2\d)(\d{6});(9\d{3})(\d{4});([58]00)(\d{4,6}) $1 $2;$1 $2;$1 $2 2;9;[58] X Oman
222 | QA قطر 974 427 8 0 X ([28]\d{2})(\d{4});([3-7]\d{3})(\d{4}) $1 $2;$1 $2 [28];[3-7] X Qatar
223 | LB لبنان 961 415 7,8 0 X (\d)(\d{3})(\d{3});([7-9]\d)(\d{3})(\d{3}) $1 $2 $3;$1 $2 $3 [13-6]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]|9;[89][01]|7(?:[01]|6[013-9]|8[89]|9[1-3]) X Lebanon
224 | LY ليبيا 218 606 9 0 X ([25679]\d)(\d{7}) $1-$2 N/A X Libya
225 | EG مصر 20 602 9,10 0 X (\d)(\d{7,8});(\d{3})(\d{3})(\d{4});(\d{2})(\d{6,7}) $1 $2;$1 $2 $3;$1 $2 [23];1[012]|[89]00;1[35]|[4-6]|[89][2-9] X Egypt
226 | MR موريتانيا 222 609 8 0 X ([2-48]\d)(\d{2})(\d{2})(\d{2}) $1 $2 $3 $4 N/A X Mauritania
227 | ET ኢትዮጵያ 251 636 9 0 X ([1-59]\d)(\d{3})(\d{4}) $1 $2 $3 N/A X Ethiopia
228 | NP नेपाल 977 429 10 0 X (1)(\d{7});(\d{2})(\d{6});(9\d{2})(\d{7}) $1-$2;$1-$2;$1-$2 1[2-6];1[01]|[2-8]|9(?:[1-69]|7[15-9]);9(?:6[013]|7[245]|8) X Nepal
229 | BD বাংলাদেশ 880 470 10 0 X (2)(\d{7,8});(\d{2})(\d{4,6});(\d{4})(\d{3,6});(\d{3})(\d{3,7}) $1-$2;$1-$2;$1-$2;$1-$2 2;[3-79]1;1|3(?:0|[2-58]2)|4(?:0|[25]2|3[23]|[4689][25])|5(?:[02-578]2|6[25])|6(?:[0347-9]2|[26][25])|7[02-9]2|8(?:[023][23]|[4-7]2)|9(?:[02][23]|[458]2|6[016]);[3-79][2-9]|8 X Bangladesh
230 | LK ශ්රී ලංකාව 94 413 9 0 X (\d{2})(\d{1})(\d{6});(\d{2})(\d{3})(\d{4}) $1 $2 $3;$1 $2 $3 [1-689];7 X Sri Lanka
231 | TH ไทย 66 520 9 0 X (2)(\d{3})(\d{4});([13-9]\d)(\d{3})(\d{3,4});(1[89]00)(\d{3})(\d{3}) $1 $2 $3;$1 $2 $3;$1 $2 $3 2;14|[3-9];1 X Thailand
232 | LA ລາວ 856 457 10 0 X (20)(\d{2})(\d{3})(\d{3});([2-8]\d)(\d{3})(\d{3});(30)(\d{2})(\d{2})(\d{3}) $1 $2 $3 $4;$1 $2 $3;$1 $2 $3 $4 20;2[13]|3[14]|[4-8];30 X Laos
233 | BT འབྲུག 975 402 8 0 X (\d{2})(\d{2})(\d{2})(\d{2});([2-8])(\d{3})(\d{3}) $1 $2 $3 $4;$1 $2 $3 1|77;[2-68]|7[246] X Bhutan
234 | MM မြန်မာ 95 414 8,9,10 0 X (\d)(\d{3})(\d{3,4});(2)(\d{4})(\d{4});(\d)(\d{2})(\d{3});(\d{2})(\d{3})(\d{3,4});(\d{2})(\d{2})(\d{3,4});(9)(\d{3})(\d{4,6});(9)([34]\d{4})(\d{4});(9)(\d{3})(\d{3})(\d{3});(9)(\d{3})(\d{3})(\d{2}) $1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3 $4;$1 $2 $3 $4 1|2[245];251;16|2;67|81;[4-8];9(?:2[0-4]|[35-9]|4[137-9]);9(?:3[0-36]|4[0-57-9]);92[56];93 X Myanmar (Burma)
235 | KH កម្ពុជា 855 456 8,9 0 X (\d{2})(\d{3})(\d{3,4});(1[89]00)(\d{3})(\d{3}) $1 $2 $3;$1 $2 $3 1\d[1-9]|[2-9];1[89]0 X Cambodia
236 | KR 대한민국 82 450 9,10 0 X (\d{2})(\d{4})(\d{4});(\d{2})(\d{3,4})(\d{4});(\d{3})(\d)(\d{4});(\d{3})(\d{2})(\d{4});(\d{3})(\d{3})(\d{4});(\d{2})(\d{2})(\d{3})(\d{4});(\d)(\d{3,4})(\d{4});(\d)(\d{3,4});(\d{2})(\d{3,4});(\d{4})(\d{4}) $1-$2-$3;$1-$2-$3;$1-$2-$3;$1-$2-$3;$1-$2-$3;$1-$2-$3-$4;$1-$2-$3;$1-$2;$1-$2;$1-$2 1(?:0|1[19]|[69]9|5[458])|[57]0#1(?:0|1[19]|[69]9|5(?:44|59|8))|[57]0;1(?:[01]|5[1-4]|6[2-8]|[7-9])|[68]0|[3-6][1-9][1-9]#1(?:[01]|5(?:[1-3]|4[56])|6[2-8]|[7-9])|[68]0|[3-6][1-9][1-9];131#1312;131#131[13-9];13[2-9];30;2[1-9];21[0-46-9];[3-6][1-9]1#[3-6][1-9]1(?:[0-46-9]);1(?:5[46-9]|6[04678]|8[0579])#1(?:5(?:44|66|77|88|99)|6(?:00|44|6[16]|70|88)|8(?:00|55|77|99)) X South Korea
237 | KP 조선 민주주의 인민 공화국 850 467 10 0 X (\d{3})(\d{3})(\d{4});(\d)(\d{3})(\d{4});(\d{2})(\d{3})(\d{3}) $1 $2 $3;$1 $2 $3;$1 $2 $3 1;2;8 X North Korea
238 | CN 中国 86 460 11 0 X (80\d{2})(\d{4});([48]00)(\d{3})(\d{4});(\d{5,6});(\d{2})(\d{5,6});(\d{3})(\d{5,6});(\d{3,4})(\d{4});(21)(\d{4})(\d{4,6});([12]\d)(\d{4})(\d{4});(\d{3})(\d{3})(\d{4});(\d{3})(\d{4})(\d{4});(\d{4})(\d{3})(\d{4});(\d{3})(\d{4})(\d{4});(10800)(\d{3})(\d{4});(\d{3})(\d{7,8}) $1 $2;$1 $2 $3;$1;$1 $2;$1 $2;$1 $2;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 $3;$1 $2 80[2678];[48]00;100|95;(?:10|2\d)[19]#(?:10|2\d)(?:10|9[56])#(?:10|2\d)(?:100|9[56]);[3-9]#[3-9]\d{2}[19]#[3-9]\d{2}(?:10|9[56]);[2-9];21;10[1-9]|2[02-9]#10[1-9]|2[02-9]#10(?:[1-79]|8(?:[1-9]|0[1-9]))|2[02-9];3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[4789]|7\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|3|5[1-9]|7[02-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5]);3(?:11|7[179])|4(?:[15]1|3[1-35])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|8(?:[57]1|98);807#8078;1[3-578];108#1080#10800;950 X China
239 | MO 中華人民共和國澳門特別行政區 853 455 8 0 X ([268]\d{3})(\d{4}) $1 $2 N/A X Macau SAR China
240 | HK 中華人民共和國香港特別行政區 852 454 8 0 X (\d{4})(\d{4});(800)(\d{3})(\d{3});(900)(\d{2})(\d{3})(\d{3});(900)(\d{2,5}) $1 $2;$1 $2 $3;$1 $2 $3 $4;$1 $2 [235-7]|[89](?:0[1-9]|[1-9]);800;900;900 X Hong Kong SAR China
241 | TW 台灣 886 466 9 0 X ([2-8])(\d{3,4})(\d{4});([89]\d{2})(\d{3})(\d{3});(70)(\d{4})(\d{4}) $1 $2 $3;$1 $2 $3;$1 $2 $3 [2-6]|[78][1-9];80|9;70 X Taiwan
242 | JP 日本 81 440,441 10 0 X (\d{3})(\d{3})(\d{3});(\d{3})(\d{3})(\d{4});(\d{4})(\d{4});(\d{4})(\d{2})(\d{3,4});(\d{4})(\d{2})(\d{4});(\d{4})(\d{3})(\d{3,4});(\d{4})(\d{4})(\d{4,5});(\d{4})(\d{5})(\d{5,6});(\d{4})(\d{6})(\d{6,7});(\d{2})(\d{4})(\d{4});(\d{4})(\d)(\d{4});(\d{3})(\d{2})(\d{4});(\d{2})(\d{3})(\d{4});(\d{3})(\d{2})(\d{4});(\d)(\d{4})(\d{4});(\d{2})(\d{3})(\d{4}) $1-$2-$3;$1-$2-$3;$1-$2;$1-$2-$3;$1-$2-$3;$1-$2-$3;$1-$2-$3;$1-$2-$3;$1-$2-$3;$1-$2-$3;$1-$2-$3;$1-$2-$3;$1-$2-$3;$1-$2-$3;$1-$2-$3;$1-$2-$3 (?:12|57|99)0;800;0077;0077;0088;00(?:37|66);00(?:37|66);00(?:37|66);00(?:37|66);[2579]0|80[1-9];1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|5(?:76|97)|499|746|8(?:3[89]|63|47|51)|9(?:49|80|9[16])#1(?:267|3(?:7[247]|9[278])|4(?:5[67]|66)|5(?:47|58|64|8[67])|6(?:3[245]|48|5[4-68]))|5(?:76|97)9|499[2468]|7468|8(?:3(?:8[78]|96)|636|477|51[24])|9(?:496|802|9(?:1[23]|69))#1(?:267|3(?:7[247]|9[278])|4(?:5[67]|66)|5(?:47|58|64|8[67])|6(?:3[245]|48|5[4-68]))|5(?:769|979[2-69])|499[2468]|7468|8(?:3(?:8[78]|96[2457-9])|636[2-57-9]|477|51[24])|9(?:496|802|9(?:1[23]|69));1(?:2[3-6]|3[3-9]|4[2-6]|5[2-8]|[68][2-7]|7[2-689]|9[1-578])|2(?:2[03-689]|3[3-58]|4[0-468]|5[04-8]|6[013-8]|7[06-9]|8[02-57-9]|9[13])|4(?:2[28]|3[689]|6[035-7]|7[05689]|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9[4-9])|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9[014-9])|8(?:2[49]|3[3-8]|4[5-8]|5[2-9]|6[35-9]|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9[3-7])#1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:5[78]|7[2-4]|[0468][2-9])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[89][2-8]|[4-7]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9[2-8])|3(?:7[2-6]|[3-6][2-9]|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5[4-7]|6[2-9]|8[2-8]|9[236-9])|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3[34]|[4-7]))#1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:5[78]|7[2-4]|[0468][2-9])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[89][2-8]|[4-7]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9(?:[3578]|20|4[04-9]|6[56]))|3(?:7(?:[2-5]|6[0-59])|[3-6][2-9]|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5(?:[467]|5[014-9])|6(?:[2-8]|9[02-69])|8[2-8]|9(?:[236-8]|9[23]))|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3(?:3[02-9]|4[0-24689])|4[2-69]|[5-7]))#1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:5[78]|7[2-4]|[0468][2-9])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[89][2-8]|[4-7]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9(?:[3578]|20|4[04-9]|6(?:5[25]|60)))|3(?:7(?:[2-5]|6[0-59])|[3-6][2-9]|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5(?:[467]|5[014-9])|6(?:[2-8]|9[02-69])|8[2-8]|9(?:[236-8]|9[23]))|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3(?:3[02-9]|4[0-24689])|4[2-69]|[5-7]));1|2(?:2[37]|5[5-9]|64|78|8[39]|91)|4(?:2[2689]|64|7[347])|5(?:[2-589]|39)|60|8(?:[46-9]|3[279]|2[124589])|9(?:[235-8]|93)#1|2(?:2[37]|5(?:[57]|[68]0|9[19])|64|78|8[39]|917)|4(?:2(?:[68]|20|9[178])|64|7[347])|5(?:[2-589]|39[67])|60|8(?:[46-9]|3[279]|2[124589])|9(?:[235-8]|93[34])#1|2(?:2[37]|5(?:[57]|[68]0|9(?:17|99))|64|78|8[39]|917)|4(?:2(?:[68]|20|9[178])|64|7[347])|5(?:[2-589]|39[67])|60|8(?:[46-9]|3[279]|2[124589])|9(?:[235-8]|93(?:31|4));2(?:9[14-79]|74|[34]7|[56]9)|82|993;3|4(?:2[09]|7[01])|6[1-9];[2479][1-9] X Japan
243 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/values-af/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | AndroidCountryCodeSelector
4 | Soek …
5 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/values-am/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | AndroidCountryCodeSelector
4 | ፍለጋ…
5 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3743af
4 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 12dp
4 | 200dp
5 | 300dp
6 |
--------------------------------------------------------------------------------
/androidcountrycodeselector/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Phone number
3 | Search …
4 | Invalid country code
5 | Choose a country
6 |
7 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | mavenCentral()
7 | }
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:2.1.0'
10 | classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
11 | classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
12 |
13 | // NOTE: Do not place your application dependencies here; they belong
14 | // in the individual module build.gradle files
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | jcenter()
21 | }
22 | }
23 |
24 | task clean(type: Delete) {
25 | delete rootProject.buildDir
26 | }
27 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junyuecao/AndroidCountryCodeSelector/dd0d800f55ca9e7c0a12ac20cc1086d6915f51c9/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Dec 28 10:00:20 PST 2015
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/sample/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/sample/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23.0.2"
6 |
7 | defaultConfig {
8 | applicationId "me.zheteng.countrycodeselector.sample"
9 | minSdkVersion 15
10 | targetSdkVersion 23
11 | versionCode 1
12 | versionName "1.0"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | testCompile 'junit:junit:4.12'
25 | compile 'com.android.support:appcompat-v7:23.3.0'
26 | compile project(':androidcountrycodeselector')
27 | }
28 |
--------------------------------------------------------------------------------
/sample/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/junyuecao/Work/adt-bundle-mac-x86_64-20140702/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/sample/src/androidTest/java/me/zheteng/countrycodeselector/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package me.zheteng.countrycodeselector;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/sample/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/sample/src/main/java/me/zheteng/countrycodeselector/sample/MainActivity.java:
--------------------------------------------------------------------------------
1 | package me.zheteng.countrycodeselector.sample;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.widget.RadioGroup;
6 | import me.zheteng.countrycodeselector.PhoneInputView;
7 |
8 | public class MainActivity extends AppCompatActivity {
9 |
10 | @Override
11 | protected void onCreate(Bundle savedInstanceState) {
12 | super.onCreate(savedInstanceState);
13 | setContentView(R.layout.activity_main);
14 |
15 | final PhoneInputView view = (PhoneInputView) findViewById(R.id.phone_input);
16 |
17 | RadioGroup radioGroup = (RadioGroup) findViewById(R.id.group);
18 | radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
19 | @Override
20 | public void onCheckedChanged(RadioGroup group, int checkedId) {
21 | if (checkedId == R.id.dialog) {
22 | view.setCountrySelectorType(PhoneInputView.SELECTOR_TYPE_DIALOG);
23 | } else if (checkedId == R.id.activity) {
24 | view.setCountrySelectorType(PhoneInputView.SELECTOR_TYPE_ACTIVITY);
25 | }
26 | }
27 | });
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
17 |
23 |
29 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junyuecao/AndroidCountryCodeSelector/dd0d800f55ca9e7c0a12ac20cc1086d6915f51c9/sample/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junyuecao/AndroidCountryCodeSelector/dd0d800f55ca9e7c0a12ac20cc1086d6915f51c9/sample/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junyuecao/AndroidCountryCodeSelector/dd0d800f55ca9e7c0a12ac20cc1086d6915f51c9/sample/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junyuecao/AndroidCountryCodeSelector/dd0d800f55ca9e7c0a12ac20cc1086d6915f51c9/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junyuecao/AndroidCountryCodeSelector/dd0d800f55ca9e7c0a12ac20cc1086d6915f51c9/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | AndroidCountryCodeSelector
3 |
4 |
5 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/sample/src/test/java/me/zheteng/countrycodeselector/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package me.zheteng.countrycodeselector;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/screenshots/screenshot1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junyuecao/AndroidCountryCodeSelector/dd0d800f55ca9e7c0a12ac20cc1086d6915f51c9/screenshots/screenshot1.png
--------------------------------------------------------------------------------
/screenshots/screenshot2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/junyuecao/AndroidCountryCodeSelector/dd0d800f55ca9e7c0a12ac20cc1086d6915f51c9/screenshots/screenshot2.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':sample', ':androidcountrycodeselector'
2 |
--------------------------------------------------------------------------------