├── .gitignore ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── me │ │ └── ibrahimsn │ │ └── phonenumberkit │ │ └── MainActivity.kt │ └── res │ ├── drawable-v24 │ └── ic_launcher_foreground.xml │ ├── drawable │ └── ic_launcher_background.xml │ ├── layout │ └── activity_main.xml │ ├── mipmap-anydpi-v26 │ ├── ic_launcher.xml │ └── ic_launcher_round.xml │ ├── mipmap-hdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-mdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xxhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ ├── mipmap-xxxhdpi │ ├── ic_launcher.png │ └── ic_launcher_round.png │ └── values │ ├── colors.xml │ ├── strings.xml │ └── styles.xml ├── art ├── ss1.jpg ├── ss2.jpg └── ss3.jpg ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── jitpack.yml ├── lib ├── .gitignore ├── build.gradle ├── consumer-rules.pro ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── assets │ └── countries.json │ ├── java │ └── me │ │ └── ibrahimsn │ │ └── lib │ │ ├── PhoneNumberKit.kt │ │ ├── api │ │ ├── Country.kt │ │ └── Phone.kt │ │ └── internal │ │ ├── core │ │ └── Proxy.kt │ │ ├── ext │ │ ├── CoroutineExt.kt │ │ ├── CountryExtensions.kt │ │ ├── Extensions.kt │ │ └── ViewExt.kt │ │ ├── io │ │ └── FileReader.kt │ │ ├── model │ │ └── State.kt │ │ ├── pattern │ │ ├── CountryPattern.kt │ │ └── Pattern.kt │ │ └── ui │ │ ├── CountryAdapter.kt │ │ ├── CountryPickerArguments.kt │ │ ├── CountryPickerBottomSheet.kt │ │ └── CountryPickerViewState.kt │ └── res │ ├── drawable-xhdpi │ ├── country_flag_ad.png │ ├── country_flag_ae.png │ ├── country_flag_af.png │ ├── country_flag_ag.png │ ├── country_flag_ai.png │ ├── country_flag_al.png │ ├── country_flag_am.png │ ├── country_flag_an.png │ ├── country_flag_ao.png │ ├── country_flag_aq.png │ ├── country_flag_ar.png │ ├── country_flag_as.png │ ├── country_flag_at.png │ ├── country_flag_au.png │ ├── country_flag_aw.png │ ├── country_flag_ax.png │ ├── country_flag_az.png │ ├── country_flag_ba.png │ ├── country_flag_bb.png │ ├── country_flag_bd.png │ ├── country_flag_be.png │ ├── country_flag_bf.png │ ├── country_flag_bg.png │ ├── country_flag_bh.png │ ├── country_flag_bi.png │ ├── country_flag_bj.png │ ├── country_flag_bl.png │ ├── country_flag_bm.png │ ├── country_flag_bn.png │ ├── country_flag_bo.png │ ├── country_flag_bq.png │ ├── country_flag_br.png │ ├── country_flag_bs.png │ ├── country_flag_bt.png │ ├── country_flag_bw.png │ ├── country_flag_by.png │ ├── country_flag_bz.png │ ├── country_flag_ca.png │ ├── country_flag_cc.png │ ├── country_flag_cd.png │ ├── country_flag_cf.png │ ├── country_flag_cg.png │ ├── country_flag_ch.png │ ├── country_flag_ci.png │ ├── country_flag_ck.png │ ├── country_flag_cl.png │ ├── country_flag_cm.png │ ├── country_flag_cn.png │ ├── country_flag_co.png │ ├── country_flag_cr.png │ ├── country_flag_cu.png │ ├── country_flag_cv.png │ ├── country_flag_cw.png │ ├── country_flag_cx.png │ ├── country_flag_cy.png │ ├── country_flag_cz.png │ ├── country_flag_de.png │ ├── country_flag_dj.png │ ├── country_flag_dk.png │ ├── country_flag_dm.png │ ├── country_flag_do.png │ ├── country_flag_dz.png │ ├── country_flag_ec.png │ ├── country_flag_ee.png │ ├── country_flag_eg.png │ ├── country_flag_eh.png │ ├── country_flag_er.png │ ├── country_flag_es.png │ ├── country_flag_et.png │ ├── country_flag_fi.png │ ├── country_flag_fj.png │ ├── country_flag_fk.png │ ├── country_flag_fm.png │ ├── country_flag_fo.png │ ├── country_flag_fr.png │ ├── country_flag_ga.png │ ├── country_flag_gb.png │ ├── country_flag_gd.png │ ├── country_flag_ge.png │ ├── country_flag_gf.png │ ├── country_flag_gg.png │ ├── country_flag_gh.png │ ├── country_flag_gi.png │ ├── country_flag_gl.png │ ├── country_flag_gm.png │ ├── country_flag_gn.png │ ├── country_flag_gp.png │ ├── country_flag_gq.png │ ├── country_flag_gr.png │ ├── country_flag_gs.png │ ├── country_flag_gt.png │ ├── country_flag_gu.png │ ├── country_flag_gw.png │ ├── country_flag_gy.png │ ├── country_flag_hk.png │ ├── country_flag_hn.png │ ├── country_flag_hr.png │ ├── country_flag_ht.png │ ├── country_flag_hu.png │ ├── country_flag_id.png │ ├── country_flag_ie.png │ ├── country_flag_il.png │ ├── country_flag_im.png │ ├── country_flag_in.png │ ├── country_flag_io.png │ ├── country_flag_iq.png │ ├── country_flag_ir.png │ ├── country_flag_is.png │ ├── country_flag_it.png │ ├── country_flag_je.png │ ├── country_flag_jm.png │ ├── country_flag_jo.png │ ├── country_flag_jp.png │ ├── country_flag_ke.png │ ├── country_flag_kg.png │ ├── country_flag_kh.png │ ├── country_flag_ki.png │ ├── country_flag_km.png │ ├── country_flag_kn.png │ ├── country_flag_kp.png │ ├── country_flag_kr.png │ ├── country_flag_kw.png │ ├── country_flag_ky.png │ ├── country_flag_kz.png │ ├── country_flag_la.png │ ├── country_flag_lb.png │ ├── country_flag_lc.png │ ├── country_flag_li.png │ ├── country_flag_lk.png │ ├── country_flag_lr.png │ ├── country_flag_ls.png │ ├── country_flag_lt.png │ ├── country_flag_lu.png │ ├── country_flag_lv.png │ ├── country_flag_ly.png │ ├── country_flag_ma.png │ ├── country_flag_mc.png │ ├── country_flag_md.png │ ├── country_flag_me.png │ ├── country_flag_mf.png │ ├── country_flag_mg.png │ ├── country_flag_mh.png │ ├── country_flag_mk.png │ ├── country_flag_ml.png │ ├── country_flag_mm.png │ ├── country_flag_mn.png │ ├── country_flag_mo.png │ ├── country_flag_mp.png │ ├── country_flag_mq.png │ ├── country_flag_mr.png │ ├── country_flag_ms.png │ ├── country_flag_mt.png │ ├── country_flag_mu.png │ ├── country_flag_mv.png │ ├── country_flag_mw.png │ ├── country_flag_mx.png │ ├── country_flag_my.png │ ├── country_flag_mz.png │ ├── country_flag_na.png │ ├── country_flag_nc.png │ ├── country_flag_ne.png │ ├── country_flag_nf.png │ ├── country_flag_ng.png │ ├── country_flag_ni.png │ ├── country_flag_nl.png │ ├── country_flag_no.png │ ├── country_flag_np.png │ ├── country_flag_nr.png │ ├── country_flag_nu.png │ ├── country_flag_nz.png │ ├── country_flag_om.png │ ├── country_flag_pa.png │ ├── country_flag_pe.png │ ├── country_flag_pf.png │ ├── country_flag_pg.png │ ├── country_flag_ph.png │ ├── country_flag_pk.png │ ├── country_flag_pl.png │ ├── country_flag_pm.png │ ├── country_flag_pn.png │ ├── country_flag_pr.png │ ├── country_flag_ps.png │ ├── country_flag_pt.png │ ├── country_flag_pw.png │ ├── country_flag_py.png │ ├── country_flag_qa.png │ ├── country_flag_re.png │ ├── country_flag_ro.png │ ├── country_flag_rs.png │ ├── country_flag_ru.png │ ├── country_flag_rw.png │ ├── country_flag_sa.png │ ├── country_flag_sb.png │ ├── country_flag_sc.png │ ├── country_flag_sd.png │ ├── country_flag_se.png │ ├── country_flag_sg.png │ ├── country_flag_sh.png │ ├── country_flag_si.png │ ├── country_flag_sj.png │ ├── country_flag_sk.png │ ├── country_flag_sl.png │ ├── country_flag_sm.png │ ├── country_flag_sn.png │ ├── country_flag_so.png │ ├── country_flag_sr.png │ ├── country_flag_ss.png │ ├── country_flag_st.png │ ├── country_flag_sv.png │ ├── country_flag_sx.png │ ├── country_flag_sy.png │ ├── country_flag_sz.png │ ├── country_flag_tc.png │ ├── country_flag_td.png │ ├── country_flag_tf.png │ ├── country_flag_tg.png │ ├── country_flag_th.png │ ├── country_flag_tj.png │ ├── country_flag_tk.png │ ├── country_flag_tl.png │ ├── country_flag_tm.png │ ├── country_flag_tn.png │ ├── country_flag_to.png │ ├── country_flag_tr.png │ ├── country_flag_tt.png │ ├── country_flag_tv.png │ ├── country_flag_tw.png │ ├── country_flag_tz.png │ ├── country_flag_ua.png │ ├── country_flag_ug.png │ ├── country_flag_us.png │ ├── country_flag_uy.png │ ├── country_flag_uz.png │ ├── country_flag_va.png │ ├── country_flag_vc.png │ ├── country_flag_ve.png │ ├── country_flag_vg.png │ ├── country_flag_vi.png │ ├── country_flag_vn.png │ ├── country_flag_vu.png │ ├── country_flag_wf.png │ ├── country_flag_ws.png │ ├── country_flag_ye.png │ ├── country_flag_yt.png │ ├── country_flag_za.png │ ├── country_flag_zm.png │ └── country_flag_zw.png │ ├── drawable │ └── ic_close_24dp.xml │ ├── layout │ ├── bottom_sheet_country_picker.xml │ └── item_country_picker.xml │ └── values │ ├── colors.xml │ ├── strings.xml │ └── style.xml └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | /.idea -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PhoneNumberKit 2 | Android **Kotlin** library to parse and format international phone numbers. Based on Google's libphonenumber library. 3 | 4 | [![](https://jitpack.io/v/ibrahimsn98/PhoneNumberKit.svg)](https://jitpack.io/#ibrahimsn98/PhoneNumberKit) 5 | 6 | 7 | ## Features 8 | 9 | | |Features | 10 | --------------------------|------------------------------------------------------------ 11 | :phone: | Validate, normalize and extract the elements of any phone number string. 12 | :dart: | Convert raw phone number to formatted phone number string. 13 | :mag: | Automatically detects country flag of the phone number. 14 | :bookmark: | Country code selection bottom sheet. 15 | :pushpin: | Convert country codes to country names and vice versa. 16 | :tr: | Get country flag icon for given iso2 code. 17 | 18 | 19 | ## Usage 20 | 21 | Create a phoneNumberKit instance and attach it to an editTextLayout. That's all you have to do. 22 | 23 | ```kotlin 24 | val phoneNumberKit = PhoneNumberKit.Builder(this) 25 | .setIconEnabled(true) 26 | .admitCountries(listOf("tr", "ca", "de")) // List only those county formats 27 | .excludeCountries(listOf("tr", "ca")) // Exclude those county formats 28 | .build() 29 | 30 | phoneNumberKit.attachToInput(textField, "tr") 31 | // OR 32 | phoneNumberKit.attachToInput(textField, 1) 33 | ``` 34 | 35 | To setup with country code selection bottom sheet 36 | 37 | ```kotlin 38 | phoneNumberKit.setupCountryPicker(this) // Requires activity context 39 | ``` 40 | 41 | To get an example phone number for given **iso2 code** 42 | 43 | ```kotlin 44 | val exampleNumber = phoneNumberKit.getExampleNumber("tr") 45 | ``` 46 | 47 | To parse raw text to phone number and receive country code, national number 48 | 49 | ```kotlin 50 | val parsedNumber = phoneNumberKit.parsePhoneNumber( 51 | number = "1266120000", 52 | defaultRegion = "us" 53 | ) 54 | 55 | parsedNumber?.nationalNumber 56 | parsedNumber?.countryCode 57 | parsedNumber?.numberOfLeadingZeros 58 | ``` 59 | 60 | To convert raw text to formatted phone number string 61 | 62 | ```kotlin 63 | val formattedNumber = phoneNumberKit.formatPhoneNumber( 64 | number = "1266120000", 65 | defaultRegion = "us" 66 | ) 67 | ``` 68 | 69 | To receive a country **flag icon** for given iso2 code 70 | 71 | ```kotlin 72 | val flag = phoneNumberKit.getFlagIcon("ca") 73 | ``` 74 | 75 | ## Usage with Custom Item Layout 76 | 77 | Add your custom item layout resource as a parameter 78 | 79 | ```kotlin 80 | phoneNumberKit.setupCountryPicker(this, R.layout.my_item_layout, searchEnabled = true) 81 | ``` 82 | 83 | You need to use below view ids in your layout file 84 | 85 | ```xml 86 | 87 | 96 | 97 | 101 | 102 | 114 | 115 | 121 | 122 | 123 | ``` 124 | 125 | 126 | ## Demo 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 |
Country Code PickerFormat ExampleFormat Example
139 | 140 | ## Installation 141 | 142 | > Follow me on Twitter [@ibrahimsn98](https://twitter.com/ibrahimsn98) 143 | 144 | Step 1. Add the JitPack repository to your build file 145 | ``` 146 | allprojects { 147 | repositories { 148 | ... 149 | maven { url 'https://jitpack.io' } 150 | } 151 | } 152 | ``` 153 | Step 2. Add the dependency 154 | ``` 155 | dependencies { 156 | implementation 'com.github.ibrahimsn98:PhoneNumberKit:2.0.6' 157 | } 158 | ``` 159 | 160 | ## Checklist 161 | - [x] Search for country codes 162 | - [x] Custom list item layout support 163 | - [x] Better performance with coroutines 164 | - [ ] Phone number validation indicator 165 | - [x] Dark theme 166 | - [ ] Tests 167 | 168 | ## Conception 169 | - This library is based on Google's lilPhoneNumber library (https://github.com/google/libphonenumber) 170 | - Inspired from PhoneNumberKit Swift library by [marmelloy](https://github.com/marmelroy) (https://github.com/marmelroy/PhoneNumberKit) 171 | - Flag images from [region-flags](https://github.com/behdad/region-flags) 172 | 173 | ## License 174 | PhoneNumberKit is available under the Apache license. See the [LICENSE](https://github.com/ibrahimsn98/PhoneNumberKit/blob/master/LICENSE) file for more info. 175 | 176 | 177 | 178 | 179 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'kotlin-parcelize' 4 | 5 | android { 6 | compileSdkVersion 31 7 | buildToolsVersion "30.0.3" 8 | 9 | defaultConfig { 10 | applicationId "me.ibrahimsn.phonenumberkit" 11 | minSdkVersion 19 12 | targetSdkVersion 31 13 | versionCode 1 14 | versionName "1.0" 15 | 16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 17 | 18 | compileOptions { 19 | sourceCompatibility JavaVersion.VERSION_11 20 | targetCompatibility JavaVersion.VERSION_11 21 | } 22 | 23 | kotlinOptions { 24 | jvmTarget = JavaVersion.VERSION_11 25 | } 26 | 27 | buildFeatures { 28 | viewBinding true 29 | } 30 | } 31 | 32 | buildTypes { 33 | release { 34 | minifyEnabled false 35 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 36 | } 37 | } 38 | } 39 | 40 | dependencies { 41 | implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.31" 42 | implementation 'androidx.core:core-ktx:1.7.0' 43 | implementation 'androidx.appcompat:appcompat:1.3.1' 44 | implementation 'androidx.constraintlayout:constraintlayout:2.1.1' 45 | 46 | implementation 'com.google.android.material:material:1.4.0' 47 | implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0' 48 | implementation project(":lib") 49 | } 50 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/java/me/ibrahimsn/phonenumberkit/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package me.ibrahimsn.phonenumberkit 2 | 3 | import androidx.appcompat.app.AppCompatActivity 4 | import android.os.Bundle 5 | import android.util.Log 6 | import me.ibrahimsn.lib.PhoneNumberKit 7 | import me.ibrahimsn.phonenumberkit.databinding.ActivityMainBinding 8 | 9 | class MainActivity : AppCompatActivity() { 10 | 11 | private lateinit var binding: ActivityMainBinding 12 | 13 | override fun onCreate(savedInstanceState: Bundle?) { 14 | super.onCreate(savedInstanceState) 15 | binding = ActivityMainBinding.inflate(layoutInflater) 16 | setContentView(binding.root) 17 | 18 | val phoneNumberKit = PhoneNumberKit.Builder(this) 19 | .setIconEnabled(true) 20 | .build() 21 | 22 | // To attach an editTextLayout 23 | phoneNumberKit.attachToInput(binding.textField, "tr") 24 | 25 | // Setup country code picker optionally 26 | phoneNumberKit.setupCountryPicker( 27 | activity = this, 28 | searchEnabled = true 29 | ) 30 | 31 | // Provides example phone number for given country iso2 code 32 | val exampleNumber = phoneNumberKit.getExampleNumber("tr") 33 | Log.d(TAG, "Example Number: $exampleNumber") 34 | 35 | // Parses raw phone number to phone object 36 | val parsedNumber = phoneNumberKit.parsePhoneNumber( 37 | number = "05066120000", 38 | defaultRegion = "us" 39 | ) 40 | Log.d(TAG, "Parsed Number: $parsedNumber") 41 | 42 | // Converts raw phone number to international formatted phone number 43 | // Ex: +90 506 606 00 00 44 | val formattedNumber = phoneNumberKit.formatPhoneNumber( 45 | number = "05066120000", 46 | defaultRegion = "tr" 47 | ) 48 | Log.d(TAG, "Formatted Number: $formattedNumber") 49 | } 50 | 51 | companion object { 52 | private const val TAG = "###" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 110 | 115 | 120 | 125 | 130 | 135 | 140 | 145 | 150 | 155 | 160 | 165 | 170 | 171 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 16 | 17 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #d32f2f 4 | #9a0007 5 | #d32f2f 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | PhoneNumberKit 3 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | -------------------------------------------------------------------------------- /art/ss1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/art/ss1.jpg -------------------------------------------------------------------------------- /art/ss2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/art/ss2.jpg -------------------------------------------------------------------------------- /art/ss3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/art/ss3.jpg -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | buildscript { 3 | repositories { 4 | google() 5 | mavenCentral() 6 | maven { url 'https://jitpack.io' } 7 | } 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.0.3' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31" 11 | 12 | // NOTE: Do not place your application dependencies here; they belong 13 | // in the individual module build.gradle files 14 | } 15 | } 16 | 17 | allprojects { 18 | repositories { 19 | google() 20 | mavenCentral() 21 | maven { url 'https://jitpack.io' } 22 | } 23 | } 24 | 25 | task clean(type: Delete) { 26 | delete rootProject.buildDir 27 | } 28 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Automatically convert third-party libraries to use AndroidX 19 | android.enableJetifier=true 20 | # Kotlin code style for this project: "official" or "obsolete": 21 | kotlin.code.style=official -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Nov 17 17:57:03 EET 2020 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-7.0.2-bin.zip 7 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Attempt to set APP_HOME 10 | # Resolve links: $0 may be a link 11 | PRG="$0" 12 | # Need this for relative symlinks. 13 | while [ -h "$PRG" ] ; do 14 | ls=`ls -ld "$PRG"` 15 | link=`expr "$ls" : '.*-> \(.*\)$'` 16 | if expr "$link" : '/.*' > /dev/null; then 17 | PRG="$link" 18 | else 19 | PRG=`dirname "$PRG"`"/$link" 20 | fi 21 | done 22 | SAVED="`pwd`" 23 | cd "`dirname \"$PRG\"`/" >/dev/null 24 | APP_HOME="`pwd -P`" 25 | cd "$SAVED" >/dev/null 26 | 27 | APP_NAME="Gradle" 28 | APP_BASE_NAME=`basename "$0"` 29 | 30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 31 | DEFAULT_JVM_OPTS="" 32 | 33 | # Use the maximum available, or set MAX_FD != -1 to use that value. 34 | MAX_FD="maximum" 35 | 36 | warn () { 37 | echo "$*" 38 | } 39 | 40 | die () { 41 | echo 42 | echo "$*" 43 | echo 44 | exit 1 45 | } 46 | 47 | # OS specific support (must be 'true' or 'false'). 48 | cygwin=false 49 | msys=false 50 | darwin=false 51 | nonstop=false 52 | case "`uname`" in 53 | CYGWIN* ) 54 | cygwin=true 55 | ;; 56 | Darwin* ) 57 | darwin=true 58 | ;; 59 | MINGW* ) 60 | msys=true 61 | ;; 62 | NONSTOP* ) 63 | nonstop=true 64 | ;; 65 | esac 66 | 67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 68 | 69 | # Determine the Java command to use to start the JVM. 70 | if [ -n "$JAVA_HOME" ] ; then 71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 72 | # IBM's JDK on AIX uses strange locations for the executables 73 | JAVACMD="$JAVA_HOME/jre/sh/java" 74 | else 75 | JAVACMD="$JAVA_HOME/bin/java" 76 | fi 77 | if [ ! -x "$JAVACMD" ] ; then 78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 79 | 80 | Please set the JAVA_HOME variable in your environment to match the 81 | location of your Java installation." 82 | fi 83 | else 84 | JAVACMD="java" 85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 86 | 87 | Please set the JAVA_HOME variable in your environment to match the 88 | location of your Java installation." 89 | fi 90 | 91 | # Increase the maximum file descriptors if we can. 92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 93 | MAX_FD_LIMIT=`ulimit -H -n` 94 | if [ $? -eq 0 ] ; then 95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 96 | MAX_FD="$MAX_FD_LIMIT" 97 | fi 98 | ulimit -n $MAX_FD 99 | if [ $? -ne 0 ] ; then 100 | warn "Could not set maximum file descriptor limit: $MAX_FD" 101 | fi 102 | else 103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 104 | fi 105 | fi 106 | 107 | # For Darwin, add options to specify how the application appears in the dock 108 | if $darwin; then 109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 110 | fi 111 | 112 | # For Cygwin, switch paths to Windows format before running java 113 | if $cygwin ; then 114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 116 | JAVACMD=`cygpath --unix "$JAVACMD"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Escape application args 158 | save () { 159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 160 | echo " " 161 | } 162 | APP_ARGS=$(save "$@") 163 | 164 | # Collect all arguments for the java command, following the shell quoting and substitution rules 165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 166 | 167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 169 | cd "$(dirname "$0")" 170 | fi 171 | 172 | exec "$JAVACMD" "$@" 173 | -------------------------------------------------------------------------------- /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 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 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 Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /jitpack.yml: -------------------------------------------------------------------------------- 1 | jdk: 2 | - openjdk11 3 | install: 4 | - ./gradlew build :lib:publishToMavenLocal -------------------------------------------------------------------------------- /lib/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /lib/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'kotlin-kapt' 4 | apply plugin: 'kotlin-parcelize' 5 | apply plugin: 'maven-publish' 6 | 7 | android { 8 | compileSdkVersion 31 9 | buildToolsVersion "30.0.3" 10 | 11 | defaultConfig { 12 | minSdkVersion 19 13 | targetSdkVersion 31 14 | 15 | compileOptions { 16 | sourceCompatibility JavaVersion.VERSION_11 17 | targetCompatibility JavaVersion.VERSION_11 18 | } 19 | 20 | kotlinOptions { 21 | jvmTarget = JavaVersion.VERSION_11 22 | } 23 | 24 | buildFeatures { 25 | viewBinding true 26 | } 27 | 28 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 29 | consumerProguardFiles "consumer-rules.pro" 30 | } 31 | 32 | buildTypes { 33 | release { 34 | minifyEnabled false 35 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 36 | } 37 | } 38 | } 39 | 40 | task androidSourcesJar(type: Jar) { 41 | classifier 'sources' 42 | from android.sourceSets.main.java.srcDirs 43 | } 44 | 45 | project.afterEvaluate { 46 | publishing { 47 | publications { 48 | release(MavenPublication) { 49 | from components.release 50 | artifact androidSourcesJar 51 | } 52 | } 53 | } 54 | } 55 | 56 | dependencies { 57 | implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.31" 58 | implementation 'androidx.core:core-ktx:1.7.0' 59 | implementation 'androidx.appcompat:appcompat:1.3.1' 60 | 61 | implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1' 62 | implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.1' 63 | 64 | implementation 'com.google.android.material:material:1.4.0' 65 | implementation 'io.michaelrocks:libphonenumber-android:8.12.31' 66 | implementation 'com.github.RedMadRobot:input-mask-android:6.1.0' 67 | } 68 | -------------------------------------------------------------------------------- /lib/consumer-rules.pro: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/consumer-rules.pro -------------------------------------------------------------------------------- /lib/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /lib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /lib/src/main/assets/countries.json: -------------------------------------------------------------------------------- 1 | [{ "code": "93", "iso2": "af", "name": "Afghanistan (‫افغانستان‬‎)" }, 2 | { "code": "355", "iso2": "al", "name": "Albania (Shqipëri)" }, 3 | { "code": "213", "iso2": "dz", "name": "Algeria (‫الجزائر‬‎)" }, 4 | { "code": "684", "iso2": "as", "name": "American Samoa" }, 5 | { "code": "376", "iso2": "ad", "name": "Andorra" }, 6 | { "code": "244", "iso2": "ao", "name": "Angola" }, 7 | { "code": "264", "iso2": "ai", "name": "Anguilla" }, 8 | { "code": "268", "iso2": "ag", "name": "Antigua and Barbuda" }, 9 | { "code": "54", "iso2": "ar", "name": "Argentina" }, 10 | { "code": "374", "iso2": "am", "name": "Armenia (Հայաստան)" }, 11 | { "code": "297", "iso2": "aw", "name": "Aruba" }, 12 | { "code": "61", "iso2": "au", "name": "Australia" }, 13 | { "code": "43", "iso2": "at", "name": "Austria (Österreich)" }, 14 | { "code": "994", "iso2": "az", "name": "Azerbaijan (Azərbaycan)" }, 15 | { "code": "242", "iso2": "bs", "name": "Bahamas" }, 16 | { "code": "973", "iso2": "bh", "name": "Bahrain (‫البحرين‬‎)" }, 17 | { "code": "880", "iso2": "bd", "name": "Bangladesh (বাংলাদেশ)" }, 18 | { "code": "246", "iso2": "bb", "name": "Barbados" }, 19 | { "code": "375", "iso2": "by", "name": "Belarus (Беларусь)" }, 20 | { "code": "32", "iso2": "be", "name": "Belgium (België)" }, 21 | { "code": "501", "iso2": "bz", "name": "Belize" }, 22 | { "code": "229", "iso2": "bj", "name": "Benin (Bénin)" }, 23 | { "code": "441", "iso2": "bm", "name": "Bermuda" }, 24 | { "code": "975", "iso2": "bt", "name": "Bhutan (འབྲུག)" }, 25 | { "code": "591", "iso2": "bo", "name": "Bolivia" }, 26 | { "code": "387", "iso2": "ba", "name": "Bosnia and Herzegovina (Босна и Херцеговина)" }, 27 | { "code": "267", "iso2": "bw", "name": "Botswana" }, 28 | { "code": "55", "iso2": "br", "name": "Brazil (Brasil)" }, 29 | { "code": "246", "iso2": "io", "name": "British Indian Ocean Territory" }, 30 | { "code": "284", "iso2": "vg", "name": "British Virgin Islands" }, 31 | { "code": "673", "iso2": "bn", "name": "Brunei" }, 32 | { "code": "359", "iso2": "bg", "name": "Bulgaria (България)" }, 33 | { "code": "226", "iso2": "bf", "name": "Burkina Faso" }, 34 | { "code": "257", "iso2": "bi", "name": "Burundi (Uburundi)" }, 35 | { "code": "855", "iso2": "kh", "name": "Cambodia (កម្ពុជា)" }, 36 | { "code": "237", "iso2": "cm", "name": "Cameroon (Cameroun)" }, 37 | { "code": "1", "iso2": "ca", "name": "Canada" }, 38 | { "code": "238", "iso2": "cv", "name": "Cape Verde (Kabu Verdi)" }, 39 | { "code": "599", "iso2": "bq", "name": "Caribbean Netherlands" }, 40 | { "code": "345", "iso2": "ky", "name": "Cayman Islands" }, 41 | { "code": "236", "iso2": "cf", "name": "Central African Republic (République centrafricaine)" }, 42 | { "code": "235", "iso2": "td", "name": "Chad (Tchad)" }, 43 | { "code": "56", "iso2": "cl", "name": "Chile" }, 44 | { "code": "86", "iso2": "cn", "name": "China (中国)" }, 45 | { "code": "61", "iso2": "cx", "name": "Christmas Island" }, 46 | { "code": "61", "iso2": "cc", "name": "Cocos (Keeling) Islands" }, 47 | { "code": "57", "iso2": "co", "name": "Colombia" }, 48 | { "code": "269", "iso2": "km", "name": "Comoros (‫جزر القمر‬‎)" }, 49 | { "code": "243", "iso2": "cd", "name": "Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)" }, 50 | { "code": "242", "iso2": "cg", "name": "Congo (Republic) (Congo-Brazzaville)" }, 51 | { "code": "682", "iso2": "ck", "name": "Cook Islands" }, 52 | { "code": "506", "iso2": "cr", "name": "Costa Rica" }, 53 | { "code": "225", "iso2": "ci", "name": "Côte d’Ivoire" }, 54 | { "code": "385", "iso2": "hr", "name": "Croatia (Hrvatska)" }, 55 | { "code": "53", "iso2": "cu", "name": "Cuba" }, 56 | { "code": "599", "iso2": "cw", "name": "Curaçao" }, 57 | { "code": "357", "iso2": "cy", "name": "Cyprus (Κύπρος)" }, 58 | { "code": "420", "iso2": "cz", "name": "Czech Republic (Česká republika)" }, 59 | { "code": "45", "iso2": "dk", "name": "Denmark (Danmark)" }, 60 | { "code": "253", "iso2": "dj", "name": "Djibouti" }, 61 | { "code": "767", "iso2": "dm", "name": "Dominica" }, 62 | { "code": "1", "iso2": "do", "name": "Dominican Republic (República Dominicana)" }, 63 | { "code": "593", "iso2": "ec", "name": "Ecuador" }, 64 | { "code": "20", "iso2": "eg", "name": "Egypt (‫مصر‬‎)" }, 65 | { "code": "503", "iso2": "sv", "name": "El Salvador" }, 66 | { "code": "240", "iso2": "gq", "name": "Equatorial Guinea (Guinea Ecuatorial)" }, 67 | { "code": "291", "iso2": "er", "name": "Eritrea" }, 68 | { "code": "372", "iso2": "ee", "name": "Estonia (Eesti)" }, 69 | { "code": "251", "iso2": "et", "name": "Ethiopia" }, 70 | { "code": "500", "iso2": "fk", "name": "Falkland Islands (Islas Malvinas)" }, 71 | { "code": "298", "iso2": "fo", "name": "Faroe Islands (Føroyar)" }, 72 | { "code": "679", "iso2": "fj", "name": "Fiji" }, 73 | { "code": "358", "iso2": "fi", "name": "Finland (Suomi)" }, 74 | { "code": "33", "iso2": "fr", "name": "France" }, 75 | { "code": "594", "iso2": "gf", "name": "French Guiana (Guyane française)" }, 76 | { "code": "689", "iso2": "pf", "name": "French Polynesia (Polynésie française)" }, 77 | { "code": "241", "iso2": "ga", "name": "Gabon" }, 78 | { "code": "220", "iso2": "gm", "name": "Gambia" }, 79 | { "code": "995", "iso2": "ge", "name": "Georgia (საქართველო)" }, 80 | { "code": "49", "iso2": "de", "name": "Germany (Deutschland)" }, 81 | { "code": "233", "iso2": "gh", "name": "Ghana (Gaana)" }, 82 | { "code": "350", "iso2": "gi", "name": "Gibraltar" }, 83 | { "code": "30", "iso2": "gr", "name": "Greece (Ελλάδα)" }, 84 | { "code": "299", "iso2": "gl", "name": "Greenland (Kalaallit Nunaat)" }, 85 | { "code": "473", "iso2": "gd", "name": "Grenada" }, 86 | { "code": "590", "iso2": "gp", "name": "Guadeloupe" }, 87 | { "code": "671", "iso2": "gu", "name": "Guam" }, 88 | { "code": "502", "iso2": "gt", "name": "Guatemala" }, 89 | { "code": "44", "iso2": "gg", "name": "Guernsey" }, 90 | { "code": "224", "iso2": "gn", "name": "Guinea (Guinée)" }, 91 | { "code": "245", "iso2": "gw", "name": "Guinea-Bissau (Guiné Bissau)" }, 92 | { "code": "592", "iso2": "gy", "name": "Guyana" }, 93 | { "code": "509", "iso2": "ht", "name": "Haiti" }, 94 | { "code": "504", "iso2": "hn", "name": "Honduras" }, 95 | { "code": "852", "iso2": "hk", "name": "Hong Kong (香港)" }, 96 | { "code": "36", "iso2": "hu", "name": "Hungary (Magyarország)" }, 97 | { "code": "354", "iso2": "is", "name": "Iceland (Ísland)" }, 98 | { "code": "91", "iso2": "in", "name": "India (भारत)" }, 99 | { "code": "62", "iso2": "id", "name": "Indonesia" }, 100 | { "code": "98", "iso2": "ir", "name": "Iran (‫ایران‬‎)" }, 101 | { "code": "964", "iso2": "iq", "name": "Iraq (‫العراق‬‎)" }, 102 | { "code": "353", "iso2": "ie", "name": "Ireland" }, 103 | { "code": "44", "iso2": "im", "name": "Isle of Man" }, 104 | { "code": "972", "iso2": "il", "name": "Israel (‫ישראל‬‎)" }, 105 | { "code": "39", "iso2": "it", "name": "Italy (Italia)" }, 106 | { "code": "1876", "iso2": "jm", "name": "Jamaica" }, 107 | { "code": "81", "iso2": "jp", "name": "Japan (日本)" }, 108 | { "code": "44", "iso2": "je", "name": "Jersey" }, 109 | { "code": "962", "iso2": "jo", "name": "Jordan (‫الأردن‬‎)" }, 110 | { "code": "7", "iso2": "kz", "name": "Kazakhstan (Казахстан)" }, 111 | { "code": "254", "iso2": "ke", "name": "Kenya" }, 112 | { "code": "686", "iso2": "ki", "name": "Kiribati" }, 113 | { "code": "965", "iso2": "kw", "name": "Kuwait (‫الكويت‬‎)" }, 114 | { "code": "996", "iso2": "kg", "name": "Kyrgyzstan (Кыргызстан)" }, 115 | { "code": "856", "iso2": "la", "name": "Laos (ລາວ)" }, 116 | { "code": "371", "iso2": "lv", "name": "Latvia (Latvija)" }, 117 | { "code": "961", "iso2": "lb", "name": "Lebanon (‫لبنان‬‎)" }, 118 | { "code": "266", "iso2": "ls", "name": "Lesotho" }, 119 | { "code": "231", "iso2": "lr", "name": "Liberia" }, 120 | { "code": "218", "iso2": "ly", "name": "Libya (‫ليبيا‬‎)" }, 121 | { "code": "423", "iso2": "li", "name": "Liechtenstein" }, 122 | { "code": "370", "iso2": "lt", "name": "Lithuania (Lietuva)" }, 123 | { "code": "352", "iso2": "lu", "name": "Luxembourg" }, 124 | { "code": "853", "iso2": "mo", "name": "Macau (澳門)" }, 125 | { "code": "389", "iso2": "mk", "name": "Macedonia (FYROM) (Македонија)" }, 126 | { "code": "261", "iso2": "mg", "name": "Madagascar (Madagasikara)" }, 127 | { "code": "265", "iso2": "mw", "name": "Malawi" }, 128 | { "code": "60", "iso2": "my", "name": "Malaysia" }, 129 | { "code": "960", "iso2": "mv", "name": "Maldives" }, 130 | { "code": "223", "iso2": "ml", "name": "Mali" }, 131 | { "code": "356", "iso2": "mt", "name": "Malta" }, 132 | { "code": "692", "iso2": "mh", "name": "Marshall Islands" }, 133 | { "code": "596", "iso2": "mq", "name": "Martinique" }, 134 | { "code": "222", "iso2": "mr", "name": "Mauritania (‫موريتانيا‬‎)" }, 135 | { "code": "230", "iso2": "mu", "name": "Mauritius (Moris)" }, 136 | { "code": "262", "iso2": "yt", "name": "Mayotte" }, 137 | { "code": "52", "iso2": "mx", "name": "Mexico (México)" }, 138 | { "code": "691", "iso2": "fm", "name": "Micronesia" }, 139 | { "code": "373", "iso2": "md", "name": "Moldova (Republica Moldova)" }, 140 | { "code": "377", "iso2": "mc", "name": "Monaco" }, 141 | { "code": "976", "iso2": "mn", "name": "Mongolia (Монгол)" }, 142 | { "code": "382", "iso2": "me", "name": "Montenegro (Crna Gora)" }, 143 | { "code": "1664", "iso2": "ms", "name": "Montserrat" }, 144 | { "code": "212", "iso2": "ma", "name": "Morocco (‫المغرب‬‎)" }, 145 | { "code": "258", "iso2": "mz", "name": "Mozambique (Moçambique)" }, 146 | { "code": "95", "iso2": "mm", "name": "Myanmar (Burma) (မြန်မာ)" }, 147 | { "code": "264", "iso2": "na", "name": "Namibia (Namibië)" }, 148 | { "code": "674", "iso2": "nr", "name": "Nauru" }, 149 | { "code": "977", "iso2": "np", "name": "Nepal (नेपाल)" }, 150 | { "code": "31", "iso2": "nl", "name": "Netherlands (Nederland)" }, 151 | { "code": "687", "iso2": "nc", "name": "New Caledonia (Nouvelle-Calédonie)" }, 152 | { "code": "64", "iso2": "nz", "name": "New Zealand" }, 153 | { "code": "505", "iso2": "ni", "name": "Nicaragua" }, 154 | { "code": "227", "iso2": "ne", "name": "Niger (Nijar)" }, 155 | { "code": "234", "iso2": "ng", "name": "Nigeria" }, 156 | { "code": "683", "iso2": "nu", "name": "Niue" }, 157 | { "code": "672", "iso2": "nf", "name": "Norfolk Island" }, 158 | { "code": "850", "iso2": "kp", "name": "North Korea (조선 민주주의 인민 공화국)" }, 159 | { "code": "1670", "iso2": "mp", "name": "Northern Mariana Islands" }, 160 | { "code": "47", "iso2": "no", "name": "Norway (Norge)" }, 161 | { "code": "968", "iso2": "om", "name": "Oman (‫عُمان‬‎)" }, 162 | { "code": "92", "iso2": "pk", "name": "Pakistan (‫پاکستان‬‎)" }, 163 | { "code": "680", "iso2": "pw", "name": "Palau" }, 164 | { "code": "970", "iso2": "ps", "name": "Palestine (‫فلسطين‬‎)" }, 165 | { "code": "507", "iso2": "pa", "name": "Panama (Panamá)" }, 166 | { "code": "675", "iso2": "pg", "name": "Papua New Guinea" }, 167 | { "code": "595", "iso2": "py", "name": "Paraguay" }, 168 | { "code": "51", "iso2": "pe", "name": "Peru (Perú)" }, 169 | { "code": "63", "iso2": "ph", "name": "Philippines" }, 170 | { "code": "48", "iso2": "pl", "name": "Poland (Polska)" }, 171 | { "code": "351", "iso2": "pt", "name": "Portugal" }, 172 | { "code": "1", "iso2": "pr", "name": "Puerto Rico" }, 173 | { "code": "974", "iso2": "qa", "name": "Qatar (‫قطر‬‎)" }, 174 | { "code": "262", "iso2": "re", "name": "Réunion (La Réunion)" }, 175 | { "code": "40", "iso2": "ro", "name": "Romania (România)" }, 176 | { "code": "7", "iso2": "ru", "name": "Russia (Россия)" }, 177 | { "code": "250", "iso2": "rw", "name": "Rwanda" }, 178 | { "code": "590", "iso2": "bl", "name": "Saint Barthélemy (Saint-Barthélemy)" }, 179 | { "code": "290", "iso2": "sh", "name": "Saint Helena" }, 180 | { "code": "1869", "iso2": "kn", "name": "Saint Kitts and Nevis" }, 181 | { "code": "758", "iso2": "lc", "name": "Saint Lucia" }, 182 | { "code": "590", "iso2": "mf", "name": "Saint Martin (Saint-Martin (partie française))" }, 183 | { "code": "508", "iso2": "pm", "name": "Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)" }, 184 | { "code": "1784", "iso2": "vc", "name": "Saint Vincent and the Grenadines" }, 185 | { "code": "685", "iso2": "ws", "name": "Samoa" }, 186 | { "code": "378", "iso2": "sm", "name": "San Marino" }, 187 | { "code": "239", "iso2": "st", "name": "São Tomé and Príncipe (São Tomé e Príncipe)" }, 188 | { "code": "966", "iso2": "sa", "name": "Saudi Arabia (‫المملكة العربية السعودية‬‎)" }, 189 | { "code": "221", "iso2": "sn", "name": "Senegal (Sénégal)" }, 190 | { "code": "381", "iso2": "rs", "name": "Serbia (Србија)" }, 191 | { "code": "248", "iso2": "sc", "name": "Seychelles" }, 192 | { "code": "232", "iso2": "sl", "name": "Sierra Leone" }, 193 | { "code": "65", "iso2": "sg", "name": "Singapore" }, 194 | { "code": "721", "iso2": "sx", "name": "Sint Maarten" }, 195 | { "code": "421", "iso2": "sk", "name": "Slovakia (Slovensko)" }, 196 | { "code": "386", "iso2": "si", "name": "Slovenia (Slovenija)" }, 197 | { "code": "677", "iso2": "sb", "name": "Solomon Islands" }, 198 | { "code": "252", "iso2": "so", "name": "Somalia (Soomaaliya)" }, 199 | { "code": "27", "iso2": "za", "name": "South Africa" }, 200 | { "code": "82", "iso2": "kr", "name": "South Korea (대한민국)" }, 201 | { "code": "211", "iso2": "ss", "name": "South Sudan (‫جنوب السودان‬‎)" }, 202 | { "code": "34", "iso2": "es", "name": "Spain (España)" }, 203 | { "code": "94", "iso2": "lk", "name": "Sri Lanka (ශ්‍රී ලංකාව)" }, 204 | { "code": "249", "iso2": "sd", "name": "Sudan (‫السودان‬‎)" }, 205 | { "code": "597", "iso2": "sr", "name": "Suriname" }, 206 | { "code": "47", "iso2": "sj", "name": "Svalbard and Jan Mayen" }, 207 | { "code": "268", "iso2": "sz", "name": "Swaziland" }, 208 | { "code": "46", "iso2": "se", "name": "Sweden (Sverige)" }, 209 | { "code": "41", "iso2": "ch", "name": "Switzerland (Schweiz)" }, 210 | { "code": "963", "iso2": "sy", "name": "Syria (‫سوريا‬‎)" }, 211 | { "code": "886", "iso2": "tw", "name": "Taiwan (台灣)" }, 212 | { "code": "992", "iso2": "tj", "name": "Tajikistan" }, 213 | { "code": "255", "iso2": "tz", "name": "Tanzania" }, 214 | { "code": "66", "iso2": "th", "name": "Thailand (ไทย)" }, 215 | { "code": "670", "iso2": "tl", "name": "Timor-Leste" }, 216 | { "code": "228", "iso2": "tg", "name": "Togo" }, 217 | { "code": "690", "iso2": "tk", "name": "Tokelau" }, 218 | { "code": "676", "iso2": "to", "name": "Tonga" }, 219 | { "code": "1868", "iso2": "tt", "name": "Trinidad and Tobago" }, 220 | { "code": "216", "iso2": "tn", "name": "Tunisia (‫تونس‬‎)" }, 221 | { "code": "90", "iso2": "tr", "name": "Turkey (Türkiye)" }, 222 | { "code": "993", "iso2": "tm", "name": "Turkmenistan" }, 223 | { "code": "1649", "iso2": "tc", "name": "Turks and Caicos Islands" }, 224 | { "code": "688", "iso2": "tv", "name": "Tuvalu" }, 225 | { "code": "1340", "iso2": "vi", "name": "U.S. Virgin Islands" }, 226 | { "code": "256", "iso2": "ug", "name": "Uganda" }, 227 | { "code": "380", "iso2": "ua", "name": "Ukraine (Україна)" }, 228 | { "code": "971", "iso2": "ae", "name": "United Arab Emirates (‫الإمارات العربية المتحدة‬‎)" }, 229 | { "code": "44", "iso2": "gb", "name": "United Kingdom" }, 230 | { "code": "1", "iso2": "us", "name": "United States" }, 231 | { "code": "598", "iso2": "uy", "name": "Uruguay" }, 232 | { "code": "998", "iso2": "uz", "name": "Uzbekistan (Oʻzbekiston)" }, 233 | { "code": "678", "iso2": "vu", "name": "Vanuatu" }, 234 | { "code": "39", "iso2": "va", "name": "Vatican City (Città del Vaticano)" }, 235 | { "code": "58", "iso2": "ve", "name": "Venezuela" }, 236 | { "code": "84", "iso2": "vn", "name": "Vietnam (Việt Nam)" }, 237 | { "code": "681", "iso2": "wf", "name": "Wallis and Futuna" }, 238 | { "code": "212", "iso2": "eh", "name": "Western Sahara (‫الصحراء الغربية‬‎)" }, 239 | { "code": "967", "iso2": "ye", "name": "Yemen (‫اليمن‬‎)" }, 240 | { "code": "260", "iso2": "zm", "name": "Zambia" }, 241 | { "code": "263", "iso2": "zw", "name": "Zimbabwe" }, 242 | { "code": "358", "iso2": "ax", "name": "Åland Islands" }] -------------------------------------------------------------------------------- /lib/src/main/java/me/ibrahimsn/lib/PhoneNumberKit.kt: -------------------------------------------------------------------------------- 1 | package me.ibrahimsn.lib 2 | 3 | import android.content.Context 4 | import android.graphics.drawable.Drawable 5 | import android.text.InputType 6 | import android.widget.EditText 7 | import androidx.appcompat.app.AppCompatActivity 8 | import androidx.core.content.ContextCompat 9 | import com.google.android.material.textfield.TextInputLayout 10 | import com.redmadrobot.inputmask.MaskedTextChangedListener 11 | import com.redmadrobot.inputmask.MaskedTextChangedListener.Companion.installOn 12 | import com.redmadrobot.inputmask.helper.AffinityCalculationStrategy 13 | import kotlinx.coroutines.* 14 | import kotlinx.coroutines.flow.MutableStateFlow 15 | import kotlinx.coroutines.flow.collect 16 | import me.ibrahimsn.lib.api.Country 17 | import me.ibrahimsn.lib.api.Phone 18 | import me.ibrahimsn.lib.internal.core.Proxy 19 | import me.ibrahimsn.lib.internal.ext.* 20 | import me.ibrahimsn.lib.internal.io.FileReader 21 | import me.ibrahimsn.lib.internal.model.State 22 | import me.ibrahimsn.lib.internal.pattern.CountryPattern 23 | import me.ibrahimsn.lib.internal.ui.CountryPickerArguments 24 | import me.ibrahimsn.lib.internal.ui.CountryPickerBottomSheet 25 | import java.lang.ref.WeakReference 26 | import java.util.* 27 | 28 | class PhoneNumberKit private constructor( 29 | private val context: Context, 30 | private val isIconEnabled: Boolean, 31 | private val excludedCountries: List, 32 | private val admittedCountries: List, 33 | ) { 34 | 35 | private val supervisorJob = SupervisorJob() 36 | 37 | private val scope = CoroutineScope(supervisorJob + Dispatchers.Main) 38 | 39 | private val proxy: Proxy by lazy { Proxy(context) } 40 | 41 | private val state: MutableStateFlow = MutableStateFlow(State.Ready) 42 | 43 | private var input: WeakReference = WeakReference(null) 44 | 45 | private val countriesCache = mutableListOf() 46 | 47 | private var inputValue: CharSequence? 48 | get() = input.get()?.editText?.text 49 | set(value) { 50 | input.get()?.editText?.setText(value) 51 | } 52 | 53 | val isValid: Boolean get() = validate(inputValue) 54 | 55 | init { 56 | scope.launch(Dispatchers.IO) { 57 | countriesCache.addAll(getCountries()) 58 | } 59 | } 60 | 61 | private var textChangedListener: MaskedTextChangedListener? = null 62 | 63 | private fun setupListener(editText: EditText, pattern: String) { 64 | editText.removeTextChangedListener(textChangedListener) 65 | textChangedListener = installOn( 66 | editText, 67 | pattern, 68 | emptyList(), 69 | AffinityCalculationStrategy.WHOLE_STRING, 70 | object : MaskedTextChangedListener.ValueListener { 71 | override fun onTextChanged( 72 | maskFilled: Boolean, 73 | extractedValue: String, 74 | formattedValue: String 75 | ) { 76 | val state = this@PhoneNumberKit.state.value 77 | if (state is State.Attached) { 78 | val parsedNumber = proxy.parsePhoneNumber( 79 | extractedValue.clearSpaces(), 80 | state.country.iso2 81 | ) 82 | 83 | if (state.country.code != parsedNumber?.countryCode) { 84 | val country = countriesCache.findCountry(parsedNumber?.countryCode) 85 | if (country != null) { 86 | setCountry(country) 87 | } 88 | } 89 | } 90 | } 91 | } 92 | ) 93 | } 94 | 95 | private fun setCountry(countryIso2: String) = scope.launch { 96 | val country = default { 97 | getCountries().findCountry( 98 | countryIso2.trim().lowercase(Locale.ENGLISH) 99 | ) 100 | } ?: return@launch 101 | setCountry(country) 102 | } 103 | 104 | private fun setCountry(country: Country) { 105 | val formattedNumber = proxy.formatPhoneNumber( 106 | proxy.getExampleNumber(country.iso2) 107 | ) 108 | val pattern = CountryPattern.create( 109 | formattedNumber.orEmpty() 110 | ) 111 | state.value = State.Attached( 112 | country = country, 113 | pattern = pattern 114 | ) 115 | } 116 | 117 | fun attachToInput( 118 | input: TextInputLayout, 119 | defaultCountry: Int, 120 | ) { 121 | this.input = WeakReference(input) 122 | scope.launch { 123 | val country = default { 124 | getCountries().findCountry(defaultCountry) 125 | } 126 | if (country != null) { 127 | attachToInput(input, country) 128 | } 129 | } 130 | } 131 | 132 | fun attachToInput( 133 | input: TextInputLayout, 134 | countryIso2: String, 135 | ) { 136 | this.input = WeakReference(input) 137 | scope.launch { 138 | val country = default { 139 | getCountries().findCountry( 140 | countryIso2.trim().lowercase(Locale.ENGLISH) 141 | ) 142 | } 143 | if (country != null) { 144 | attachToInput(input, country) 145 | } 146 | } 147 | } 148 | 149 | private fun collectState() = scope.launch { 150 | state.collect { state -> 151 | when (state) { 152 | is State.Ready -> {} 153 | is State.Attached -> { 154 | if (isIconEnabled) { 155 | getFlagIcon(state.country.iso2)?.let { icon -> 156 | input.get()?.startIconDrawable = icon 157 | } 158 | } 159 | input.get()?.editText?.let { editText -> 160 | setupListener(editText, state.pattern) 161 | } 162 | if (inputValue.isNullOrEmpty()) { 163 | inputValue = state.country.code.toString() 164 | } 165 | } 166 | } 167 | } 168 | } 169 | 170 | private suspend fun getCountries() = io { 171 | if (countriesCache.isEmpty()) { 172 | FileReader.readAssetFile(context, ASSET_FILE_NAME).toCountryList() 173 | } else { 174 | countriesCache 175 | } 176 | } 177 | 178 | private fun clearInputValue() { 179 | inputValue = "" 180 | } 181 | 182 | private fun attachToInput( 183 | input: TextInputLayout, 184 | country: Country, 185 | ) { 186 | input.editText?.inputType = InputType.TYPE_CLASS_PHONE 187 | 188 | input.isStartIconVisible = isIconEnabled 189 | input.setStartIconTintList(null) 190 | 191 | collectState() 192 | setCountry(country.iso2) 193 | } 194 | 195 | /** 196 | * Sets up country code picker bottomSheet 197 | */ 198 | fun setupCountryPicker( 199 | activity: AppCompatActivity, 200 | itemLayout: Int = R.layout.item_country_picker, 201 | searchEnabled: Boolean = false, 202 | ) { 203 | input.get()?.isStartIconCheckable = true 204 | input.get()?.setStartIconOnClickListener { 205 | CountryPickerBottomSheet.newInstance( 206 | CountryPickerArguments( 207 | itemLayout, 208 | searchEnabled, 209 | excludedCountries, 210 | admittedCountries 211 | ) 212 | ).apply { 213 | onCountrySelectedListener = { country -> 214 | clearInputValue() 215 | setCountry(country) 216 | } 217 | show( 218 | activity.supportFragmentManager, 219 | CountryPickerBottomSheet.TAG 220 | ) 221 | } 222 | } 223 | } 224 | 225 | /** 226 | * Parses raw phone number into phone object 227 | */ 228 | fun parsePhoneNumber(number: String?, defaultRegion: String?): Phone? { 229 | proxy.parsePhoneNumber(number, defaultRegion)?.let { phone -> 230 | return Phone( 231 | nationalNumber = phone.nationalNumber, 232 | countryCode = phone.countryCode, 233 | rawInput = phone.rawInput, 234 | numberOfLeadingZeros = phone.numberOfLeadingZeros 235 | ) 236 | } 237 | return null 238 | } 239 | 240 | /** 241 | * Formats raw phone number into international phone 242 | */ 243 | fun formatPhoneNumber(number: String?, defaultRegion: String?): String? { 244 | return proxy.formatPhoneNumber(proxy.parsePhoneNumber(number, defaultRegion)) 245 | } 246 | 247 | /** 248 | * Provides an example phone number according to country iso2 code 249 | */ 250 | fun getExampleNumber(iso2: String?): Phone? { 251 | proxy.getExampleNumber(iso2)?.let { phone -> 252 | return Phone( 253 | nationalNumber = phone.nationalNumber, 254 | countryCode = phone.countryCode, 255 | rawInput = phone.rawInput, 256 | numberOfLeadingZeros = phone.numberOfLeadingZeros 257 | ) 258 | } 259 | return null 260 | } 261 | 262 | /** 263 | * Provides country flag icon for given country iso2 code 264 | */ 265 | fun getFlagIcon(iso2: String?): Drawable? { 266 | return try { 267 | ContextCompat.getDrawable( 268 | context, context.resources.getIdentifier( 269 | "country_flag_$iso2", 270 | "drawable", 271 | context.packageName 272 | ) 273 | ) 274 | } catch (e: Exception) { 275 | e.printStackTrace() 276 | null 277 | } 278 | } 279 | 280 | private fun List.findCountry( 281 | countryCode: Int? 282 | ) = this.filter { 283 | admittedCountries.isEmpty() || admittedCountries.contains(it.iso2) 284 | }.filterNot { 285 | excludedCountries.contains(it.iso2) 286 | }.firstOrNull { 287 | it.code == countryCode 288 | } 289 | 290 | private fun List.findCountry( 291 | countryIso2: String? 292 | ) = this.filter { 293 | admittedCountries.isEmpty() || admittedCountries.contains(it.iso2) 294 | }.filterNot { 295 | excludedCountries.contains(it.iso2) 296 | }.firstOrNull { 297 | it.iso2 == countryIso2 298 | } 299 | 300 | private fun validate(number: CharSequence?): Boolean { 301 | if (number == null) return false 302 | return state.value.doIfAttached { 303 | proxy.validateNumber(number.toString(), country.iso2) 304 | } ?: false 305 | } 306 | 307 | companion object { 308 | const val ASSET_FILE_NAME = "countries.json" 309 | } 310 | 311 | class Builder(private val context: Context) { 312 | 313 | private var isIconEnabled: Boolean = true 314 | 315 | private var excludedCountries: List? = null 316 | 317 | private var admittedCountries: List? = null 318 | 319 | fun setIconEnabled(isEnabled: Boolean): Builder { 320 | this.isIconEnabled = isEnabled 321 | return this 322 | } 323 | 324 | fun excludeCountries(countries: List): Builder { 325 | this.excludedCountries = countries 326 | return this 327 | } 328 | 329 | fun admitCountries(countries: List): Builder { 330 | this.admittedCountries = countries 331 | return this 332 | } 333 | 334 | fun build(): PhoneNumberKit { 335 | return PhoneNumberKit( 336 | context, 337 | isIconEnabled, 338 | excludedCountries.orEmpty(), 339 | admittedCountries.orEmpty() 340 | ) 341 | } 342 | } 343 | } 344 | -------------------------------------------------------------------------------- /lib/src/main/java/me/ibrahimsn/lib/api/Country.kt: -------------------------------------------------------------------------------- 1 | package me.ibrahimsn.lib.api 2 | 3 | data class Country( 4 | val iso2: String, 5 | val name: String, 6 | val code: Int, 7 | ) 8 | -------------------------------------------------------------------------------- /lib/src/main/java/me/ibrahimsn/lib/api/Phone.kt: -------------------------------------------------------------------------------- 1 | package me.ibrahimsn.lib.api 2 | 3 | data class Phone( 4 | val nationalNumber: Long?, 5 | val countryCode: Int?, 6 | val rawInput: String?, 7 | val numberOfLeadingZeros: Int? 8 | ) 9 | -------------------------------------------------------------------------------- /lib/src/main/java/me/ibrahimsn/lib/internal/core/Proxy.kt: -------------------------------------------------------------------------------- 1 | package me.ibrahimsn.lib.internal.core 2 | 3 | import android.content.Context 4 | import io.michaelrocks.libphonenumber.android.NumberParseException 5 | import io.michaelrocks.libphonenumber.android.PhoneNumberUtil 6 | import io.michaelrocks.libphonenumber.android.Phonenumber 7 | import me.ibrahimsn.lib.internal.ext.prependPlus 8 | import me.ibrahimsn.lib.internal.ext.startsWithPlus 9 | import java.util.* 10 | 11 | internal class Proxy(context: Context) { 12 | 13 | private var phoneUtil: PhoneNumberUtil = PhoneNumberUtil.createInstance(context) 14 | 15 | fun parsePhoneNumber( 16 | number: String?, 17 | defaultRegion: String? 18 | ): Phonenumber.PhoneNumber? { 19 | return try { 20 | phoneUtil.parseAndKeepRawInput( 21 | if (number.startsWithPlus()) number else number.prependPlus(), 22 | defaultRegion?.uppercase(Locale.ROOT) 23 | ) 24 | } catch (e: NumberParseException) { 25 | null 26 | } 27 | } 28 | 29 | fun formatPhoneNumber(phoneNumber: Phonenumber.PhoneNumber?): String? { 30 | return try { 31 | phoneUtil.format( 32 | phoneNumber, 33 | PhoneNumberUtil.PhoneNumberFormat.INTERNATIONAL 34 | ) 35 | } catch (e: Exception) { 36 | null 37 | } 38 | } 39 | 40 | /** 41 | * Provides an example phone number according to country iso2 code 42 | */ 43 | fun getExampleNumber(iso2: String?): Phonenumber.PhoneNumber? { 44 | return try { 45 | phoneUtil.getExampleNumberForType( 46 | iso2?.uppercase(Locale.ROOT), 47 | PhoneNumberUtil.PhoneNumberType.MOBILE 48 | ) 49 | } catch (e: Exception) { 50 | null 51 | } 52 | } 53 | 54 | fun validateNumber(number: String?, countryCode: String?): Boolean { 55 | return try { 56 | val p = parsePhoneNumber(number, countryCode) 57 | return phoneUtil.isValidNumber(p) 58 | } catch (e: Exception) { 59 | false 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /lib/src/main/java/me/ibrahimsn/lib/internal/ext/CoroutineExt.kt: -------------------------------------------------------------------------------- 1 | package me.ibrahimsn.lib.internal.ext 2 | 3 | import kotlinx.coroutines.Dispatchers 4 | import kotlinx.coroutines.withContext 5 | 6 | internal suspend fun default( 7 | block: suspend () -> T 8 | ) = withContext(Dispatchers.Default) { 9 | block.invoke() 10 | } 11 | 12 | internal suspend fun io( 13 | block: suspend () -> T 14 | ) = withContext(Dispatchers.IO) { 15 | block.invoke() 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/main/java/me/ibrahimsn/lib/internal/ext/CountryExtensions.kt: -------------------------------------------------------------------------------- 1 | package me.ibrahimsn.lib.internal.ext 2 | 3 | import me.ibrahimsn.lib.api.Country 4 | import org.json.JSONArray 5 | 6 | internal fun String?.toCountryList(): List { 7 | val countries = mutableListOf() 8 | try { 9 | val json = JSONArray(this) 10 | for (i in 0 until json.length()) { 11 | val country = json.getJSONObject(i) 12 | countries.add( 13 | Country( 14 | iso2 = country.getString("iso2"), 15 | name = country.getString("name"), 16 | code = country.getInt("code") 17 | ) 18 | ) 19 | } 20 | } catch (e: Exception) { 21 | // ignored 22 | } 23 | return countries 24 | } 25 | -------------------------------------------------------------------------------- /lib/src/main/java/me/ibrahimsn/lib/internal/ext/Extensions.kt: -------------------------------------------------------------------------------- 1 | package me.ibrahimsn.lib.internal.ext 2 | 3 | import me.ibrahimsn.lib.internal.model.State 4 | 5 | private const val CHAR_PLUS = "+" 6 | 7 | internal fun CharSequence?.prependPlus(): String { 8 | return StringBuilder() 9 | .append(CHAR_PLUS) 10 | .append(this) 11 | .toString() 12 | } 13 | 14 | internal fun CharSequence?.startsWithPlus(): Boolean { 15 | return this?.startsWith(CHAR_PLUS) == true 16 | } 17 | 18 | internal fun String?.clearSpaces(): String? { 19 | return this?.replace("\\s+", "") 20 | } 21 | 22 | internal fun State.doIfAttached(block: State.Attached.() -> T): T? { 23 | if (this is State.Attached) return block.invoke(this) 24 | return null 25 | } 26 | -------------------------------------------------------------------------------- /lib/src/main/java/me/ibrahimsn/lib/internal/ext/ViewExt.kt: -------------------------------------------------------------------------------- 1 | package me.ibrahimsn.lib.internal.ext 2 | 3 | import android.view.View 4 | import android.widget.EditText 5 | 6 | internal fun View.showIf(statement: Boolean) { 7 | visibility = if (statement) View.VISIBLE else View.GONE 8 | } 9 | -------------------------------------------------------------------------------- /lib/src/main/java/me/ibrahimsn/lib/internal/io/FileReader.kt: -------------------------------------------------------------------------------- 1 | package me.ibrahimsn.lib.internal.io 2 | 3 | import android.content.Context 4 | import java.io.IOException 5 | 6 | object FileReader { 7 | 8 | fun readAssetFile(context: Context, name: String): String? { 9 | return try { 10 | return context.assets.open(name) 11 | .bufferedReader() 12 | .use { it.readText() } 13 | } catch (e: IOException) { 14 | null 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/src/main/java/me/ibrahimsn/lib/internal/model/State.kt: -------------------------------------------------------------------------------- 1 | package me.ibrahimsn.lib.internal.model 2 | 3 | import me.ibrahimsn.lib.api.Country 4 | import me.ibrahimsn.lib.internal.pattern.CountryPattern 5 | 6 | sealed class State { 7 | 8 | object Ready : State() 9 | 10 | data class Attached( 11 | val country: Country, 12 | val pattern: String, 13 | ) : State() 14 | } 15 | -------------------------------------------------------------------------------- /lib/src/main/java/me/ibrahimsn/lib/internal/pattern/CountryPattern.kt: -------------------------------------------------------------------------------- 1 | package me.ibrahimsn.lib.internal.pattern 2 | 3 | object CountryPattern : Pattern { 4 | 5 | private const val PATTERN_DIGIT_GROUP = "(\\d+)" 6 | private const val PATTERN_DIGITS = "\\d" 7 | 8 | override fun create(number: String): String { 9 | return number 10 | .replace(PATTERN_DIGIT_GROUP.toRegex(), "[$0]") 11 | .replace(PATTERN_DIGITS.toRegex(), "0") 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/src/main/java/me/ibrahimsn/lib/internal/pattern/Pattern.kt: -------------------------------------------------------------------------------- 1 | package me.ibrahimsn.lib.internal.pattern 2 | 3 | interface Pattern { 4 | 5 | fun create(number: String): String 6 | } 7 | -------------------------------------------------------------------------------- /lib/src/main/java/me/ibrahimsn/lib/internal/ui/CountryAdapter.kt: -------------------------------------------------------------------------------- 1 | package me.ibrahimsn.lib.internal.ui 2 | 3 | import android.view.LayoutInflater 4 | import android.view.View 5 | import android.view.ViewGroup 6 | import android.widget.ImageView 7 | import android.widget.TextView 8 | import androidx.annotation.LayoutRes 9 | import androidx.recyclerview.widget.DiffUtil 10 | import androidx.recyclerview.widget.RecyclerView 11 | import me.ibrahimsn.lib.api.Country 12 | import me.ibrahimsn.lib.R 13 | 14 | class CountryAdapter( 15 | @LayoutRes private var itemLayout: Int, 16 | ) : RecyclerView.Adapter() { 17 | 18 | private val items = mutableListOf() 19 | 20 | var onItemClickListener: ((Country) -> Unit)? = null 21 | 22 | override fun onCreateViewHolder( 23 | parent: ViewGroup, 24 | viewType: Int 25 | ): ItemViewHolder { 26 | return ItemViewHolder( 27 | LayoutInflater.from(parent.context) 28 | .inflate(itemLayout, parent, false) 29 | ) 30 | } 31 | 32 | override fun onBindViewHolder(holder: ItemViewHolder, position: Int) { 33 | holder.bind(items[position]) 34 | } 35 | 36 | override fun getItemCount(): Int = items.size 37 | 38 | fun setup(items: List) { 39 | val diffCallback = DiffUtil.calculateDiff(ItemDiffCallback(this.items, items)) 40 | this.items.clear() 41 | this.items.addAll(items) 42 | diffCallback.dispatchUpdatesTo(this) 43 | } 44 | 45 | inner class ItemViewHolder(view: View): RecyclerView.ViewHolder(view) { 46 | 47 | private val imageViewFlag = view.findViewById(R.id.imageViewFlag) 48 | private val textViewName = view.findViewById(R.id.textViewName) 49 | private val textViewCode = view.findViewById(R.id.textViewCode) 50 | 51 | private var boundItem: Country? = null 52 | 53 | init { 54 | itemView.setOnClickListener { 55 | boundItem?.let { 56 | onItemClickListener?.invoke(it) 57 | } 58 | } 59 | } 60 | 61 | fun bind(country: Country) { 62 | this.boundItem = country 63 | imageViewFlag.setImageResource(getFlagResource(country.iso2)) 64 | textViewName.text = country.name 65 | textViewCode.text = country.code.toString() 66 | } 67 | 68 | private fun getFlagResource(iso2: String?): Int { 69 | return itemView.context.resources.getIdentifier( 70 | "country_flag_$iso2", 71 | "drawable", 72 | itemView.context.packageName 73 | ) 74 | } 75 | } 76 | 77 | inner class ItemDiffCallback( 78 | private val oldItems: List, 79 | private val newItems: List 80 | ) : DiffUtil.Callback() { 81 | 82 | override fun getOldListSize() = oldItems.size 83 | 84 | override fun getNewListSize() = newItems.size 85 | 86 | override fun areItemsTheSame(oldPos: Int, newPos: Int): Boolean { 87 | return oldItems[oldPos].iso2 == newItems[newPos].iso2 88 | } 89 | 90 | override fun areContentsTheSame(oldPos: Int, newPos: Int): Boolean { 91 | return oldItems[oldPos].iso2 == newItems[newPos].iso2 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /lib/src/main/java/me/ibrahimsn/lib/internal/ui/CountryPickerArguments.kt: -------------------------------------------------------------------------------- 1 | package me.ibrahimsn.lib.internal.ui 2 | 3 | import android.os.Parcelable 4 | import kotlinx.android.parcel.Parcelize 5 | 6 | @Parcelize 7 | data class CountryPickerArguments( 8 | val itemLayout: Int, 9 | val isSearchEnabled: Boolean, 10 | val excludedCountries: List, 11 | val admittedCountries: List, 12 | ) : Parcelable 13 | -------------------------------------------------------------------------------- /lib/src/main/java/me/ibrahimsn/lib/internal/ui/CountryPickerBottomSheet.kt: -------------------------------------------------------------------------------- 1 | package me.ibrahimsn.lib.internal.ui 2 | 3 | import android.os.Bundle 4 | import android.view.LayoutInflater 5 | import android.view.View 6 | import android.view.ViewGroup 7 | import androidx.appcompat.widget.SearchView 8 | import androidx.core.os.bundleOf 9 | import androidx.recyclerview.widget.DividerItemDecoration 10 | import androidx.recyclerview.widget.LinearLayoutManager 11 | import com.google.android.material.bottomsheet.BottomSheetDialogFragment 12 | import kotlinx.coroutines.CoroutineScope 13 | import kotlinx.coroutines.Dispatchers 14 | import kotlinx.coroutines.SupervisorJob 15 | import kotlinx.coroutines.flow.MutableStateFlow 16 | import kotlinx.coroutines.flow.collect 17 | import kotlinx.coroutines.launch 18 | import me.ibrahimsn.lib.PhoneNumberKit 19 | import me.ibrahimsn.lib.R 20 | import me.ibrahimsn.lib.api.Country 21 | import me.ibrahimsn.lib.databinding.BottomSheetCountryPickerBinding 22 | import me.ibrahimsn.lib.internal.ext.default 23 | import me.ibrahimsn.lib.internal.ext.showIf 24 | import me.ibrahimsn.lib.internal.ext.toCountryList 25 | import me.ibrahimsn.lib.internal.io.FileReader 26 | import java.util.* 27 | 28 | class CountryPickerBottomSheet : BottomSheetDialogFragment() { 29 | 30 | private val supervisorJob = SupervisorJob() 31 | 32 | private val scope = CoroutineScope(supervisorJob + Dispatchers.Main) 33 | 34 | private lateinit var binding: BottomSheetCountryPickerBinding 35 | 36 | var onCountrySelectedListener: ((Country) -> Unit)? = null 37 | 38 | private val viewState: MutableStateFlow = MutableStateFlow( 39 | CountryPickerViewState(emptyList()) 40 | ) 41 | 42 | private val args: CountryPickerArguments by lazy { 43 | requireNotNull(requireArguments().getParcelable(BUNDLE_ARGS)) 44 | } 45 | 46 | private val itemAdapter: CountryAdapter by lazy { 47 | CountryAdapter(args.itemLayout) 48 | } 49 | 50 | override fun onCreate(savedInstanceState: Bundle?) { 51 | super.onCreate(savedInstanceState) 52 | setStyle(STYLE_NORMAL, R.style.ThemeOverlay_PhoneNumberKit_BottomSheetDialog) 53 | } 54 | 55 | override fun onCreateView( 56 | inflater: LayoutInflater, 57 | container: ViewGroup?, 58 | savedInstanceState: Bundle? 59 | ): View { 60 | binding = BottomSheetCountryPickerBinding.inflate(layoutInflater) 61 | return binding.root 62 | } 63 | 64 | override fun onViewCreated(view: View, savedInstanceState: Bundle?) { 65 | super.onViewCreated(view, savedInstanceState) 66 | initView() 67 | collectViewState() 68 | fetchData() 69 | } 70 | 71 | private fun initView() = with(binding) { 72 | searchView.showIf(args.isSearchEnabled) 73 | 74 | recyclerView.apply { 75 | addItemDecoration(DividerItemDecoration(context, DividerItemDecoration.VERTICAL)) 76 | layoutManager = LinearLayoutManager(context) 77 | adapter = itemAdapter 78 | } 79 | 80 | imageButtonClose.setOnClickListener { 81 | dismiss() 82 | } 83 | 84 | searchView.setOnQueryTextListener(object: SearchView.OnQueryTextListener { 85 | override fun onQueryTextSubmit(query: String?): Boolean { 86 | return true 87 | } 88 | 89 | override fun onQueryTextChange(newText: String?): Boolean { 90 | searchCountries(newText) 91 | return true 92 | } 93 | }) 94 | 95 | itemAdapter.onItemClickListener = { 96 | onCountrySelectedListener?.invoke(it) 97 | dismiss() 98 | } 99 | } 100 | 101 | private fun collectViewState() = scope.launch { 102 | viewState.collect { 103 | itemAdapter.setup(it.countries) 104 | } 105 | } 106 | 107 | private fun fetchData() = scope.launch { 108 | val countries = default { 109 | FileReader.readAssetFile(requireContext(), PhoneNumberKit.ASSET_FILE_NAME) 110 | .toCountryList() 111 | .filter { 112 | args.admittedCountries.isEmpty() || args.admittedCountries.contains(it.iso2) 113 | }.filterNot { 114 | args.excludedCountries.contains(it.iso2) 115 | } 116 | } 117 | viewState.value = CountryPickerViewState(countries) 118 | } 119 | 120 | private fun searchCountries(query: String?) { 121 | scope.launch { 122 | query?.let { 123 | val countries = viewState.value.countries 124 | val filtered = countries.filter { 125 | it.code.toString().startsWith(query) || 126 | it.name.lowercase(Locale.ROOT).contains(query.lowercase(Locale.ROOT)) 127 | } 128 | binding.recyclerView.post { 129 | itemAdapter.setup(filtered) 130 | } 131 | } 132 | } 133 | } 134 | 135 | companion object { 136 | 137 | const val TAG = "countryPickerBottomSheet" 138 | private const val BUNDLE_ARGS = "bundleArgs" 139 | 140 | fun newInstance( 141 | args: CountryPickerArguments 142 | ) = CountryPickerBottomSheet().apply { 143 | arguments = bundleOf(BUNDLE_ARGS to args) 144 | } 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /lib/src/main/java/me/ibrahimsn/lib/internal/ui/CountryPickerViewState.kt: -------------------------------------------------------------------------------- 1 | package me.ibrahimsn.lib.internal.ui 2 | 3 | import me.ibrahimsn.lib.api.Country 4 | 5 | data class CountryPickerViewState( 6 | val countries: List, 7 | ) 8 | -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ad.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ae.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ae.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_af.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_af.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ag.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ai.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_al.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_al.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_am.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_am.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_an.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_an.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ao.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_aq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_aq.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ar.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_as.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_as.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_at.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_at.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_au.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_au.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_aw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_aw.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ax.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_az.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_az.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ba.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ba.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_bb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_bb.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_bd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_bd.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_be.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_be.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_bf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_bf.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_bg.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_bh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_bh.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_bi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_bi.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_bj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_bj.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_bl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_bl.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_bm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_bm.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_bn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_bn.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_bo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_bo.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_bq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_bq.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_br.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_br.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_bs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_bs.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_bt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_bt.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_bw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_bw.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_by.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_by.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_bz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_bz.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ca.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_cc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_cc.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_cd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_cd.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_cf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_cf.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_cg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_cg.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ch.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ci.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ci.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ck.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_cl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_cl.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_cm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_cm.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_cn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_cn.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_co.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_co.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_cr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_cr.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_cu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_cu.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_cv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_cv.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_cw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_cw.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_cx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_cx.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_cy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_cy.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_cz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_cz.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_de.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_dj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_dj.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_dk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_dk.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_dm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_dm.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_do.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_do.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_dz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_dz.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ec.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ee.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_eg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_eg.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_eh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_eh.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_er.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_er.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_es.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_et.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_et.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_fi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_fi.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_fj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_fj.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_fk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_fk.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_fm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_fm.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_fo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_fo.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_fr.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ga.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ga.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_gb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_gb.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_gd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_gd.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ge.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_gf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_gf.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_gg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_gg.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_gh.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_gi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_gi.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_gl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_gl.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_gm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_gm.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_gn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_gn.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_gp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_gp.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_gq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_gq.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_gr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_gr.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_gs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_gs.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_gt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_gt.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_gu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_gu.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_gw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_gw.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_gy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_gy.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_hk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_hk.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_hn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_hn.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_hr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_hr.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ht.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ht.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_hu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_hu.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_id.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ie.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_il.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_il.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_im.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_im.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_in.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_io.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_io.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_iq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_iq.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ir.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_is.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_is.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_it.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_it.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_je.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_je.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_jm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_jm.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_jo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_jo.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_jp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_jp.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ke.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_kg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_kg.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_kh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_kh.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ki.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ki.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_km.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_km.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_kn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_kn.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_kp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_kp.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_kr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_kr.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_kw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_kw.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ky.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ky.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_kz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_kz.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_la.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_la.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_lb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_lb.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_lc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_lc.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_li.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_li.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_lk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_lk.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_lr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_lr.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ls.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_lt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_lt.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_lu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_lu.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_lv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_lv.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ly.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ma.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_mc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_mc.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_md.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_md.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_me.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_me.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_mf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_mf.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_mg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_mg.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_mh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_mh.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_mk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_mk.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ml.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_mm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_mm.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_mn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_mn.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_mo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_mo.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_mp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_mp.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_mq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_mq.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_mr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_mr.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ms.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_mt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_mt.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_mu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_mu.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_mv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_mv.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_mw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_mw.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_mx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_mx.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_my.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_my.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_mz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_mz.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_na.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_na.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_nc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_nc.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ne.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_nf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_nf.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ng.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ni.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ni.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_nl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_nl.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_no.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_no.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_np.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_np.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_nr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_nr.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_nu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_nu.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_nz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_nz.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_om.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_om.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_pa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_pa.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_pe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_pe.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_pf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_pf.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_pg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_pg.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ph.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_pk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_pk.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_pl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_pl.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_pm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_pm.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_pn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_pn.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_pr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_pr.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ps.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_pt.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_pw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_pw.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_py.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_py.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_qa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_qa.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_re.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_re.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ro.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_rs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_rs.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ru.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ru.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_rw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_rw.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_sa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_sa.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_sb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_sb.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_sc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_sc.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_sd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_sd.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_se.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_sg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_sg.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_sh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_sh.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_si.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_si.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_sj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_sj.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_sk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_sk.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_sl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_sl.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_sm.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_sn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_sn.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_so.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_so.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_sr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_sr.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ss.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_st.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_st.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_sv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_sv.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_sx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_sx.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_sy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_sy.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_sz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_sz.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_tc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_tc.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_td.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_td.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_tf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_tf.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_tg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_tg.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_th.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_th.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_tj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_tj.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_tk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_tk.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_tl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_tl.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_tm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_tm.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_tn.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_to.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_to.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_tr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_tr.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_tt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_tt.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_tv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_tv.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_tw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_tw.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_tz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_tz.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ua.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ua.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ug.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_us.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_us.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_uy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_uy.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_uz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_uz.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_va.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_va.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_vc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_vc.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ve.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_vg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_vg.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_vi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_vi.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_vn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_vn.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_vu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_vu.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_wf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_wf.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ws.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ws.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_ye.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_ye.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_yt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_yt.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_za.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_za.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_zm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_zm.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable-xhdpi/country_flag_zw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ibrahimsn98/PhoneNumberKit/376d8e6725ec6c3081bf23272b4482bedc1bd7f3/lib/src/main/res/drawable-xhdpi/country_flag_zw.png -------------------------------------------------------------------------------- /lib/src/main/res/drawable/ic_close_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /lib/src/main/res/layout/bottom_sheet_country_picker.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 16 | 17 | 23 | 24 | 30 | 31 | 32 | 33 | 41 | 42 | 51 | 52 | 53 | 54 | 60 | 61 | -------------------------------------------------------------------------------- /lib/src/main/res/layout/item_country_picker.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 18 | 19 | 31 | 32 | 38 | 39 | -------------------------------------------------------------------------------- /lib/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Type country code or name… 4 | Country Code 5 | Search country code 6 | -------------------------------------------------------------------------------- /lib/src/main/res/values/style.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 17 | 18 | 25 | 26 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':lib' 2 | include ':app' 3 | rootProject.name = "PhoneNumberKit" --------------------------------------------------------------------------------