{"id":21942039,"url":"https://github.com/malekkamel/phone-field","last_synced_at":"2026-04-18T01:38:24.215Z","repository":{"id":90820898,"uuid":"126211242","full_name":"MalekKamel/phone-field","owner":"MalekKamel","description":null,"archived":false,"fork":false,"pushed_at":"2018-08-28T12:38:03.000Z","size":3601,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-27T15:43:32.643Z","etag":null,"topics":["android","android-library","edittext","java-8","phone","phonenumber"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MalekKamel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-21T16:48:23.000Z","updated_at":"2021-05-30T01:42:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"d422d189-122c-4c9f-91b1-1d3e001ac4f6","html_url":"https://github.com/MalekKamel/phone-field","commit_stats":null,"previous_names":["malekkamel/phone-field","shabankamell/phone-field"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MalekKamel%2Fphone-field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MalekKamel%2Fphone-field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MalekKamel%2Fphone-field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MalekKamel%2Fphone-field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MalekKamel","download_url":"https://codeload.github.com/MalekKamel/phone-field/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244976072,"owners_count":20541405,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-library","edittext","java-8","phone","phonenumber"],"created_at":"2024-11-29T03:16:16.915Z","updated_at":"2025-10-19T19:18:57.932Z","avatar_url":"https://github.com/MalekKamel.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PhoneFiled\n\n\n##### PhoneFiled is an easy way to select country phone and validate the entered number.\n\n##### It's a fork from https://github.com/lamudi-gmbh/android-phone-field.\n##### I added a search and arabic names for countries.\n\n# Installation\n\n```gradle\nrepositories {\n        maven {\n            url  \"https://dl.bintray.com/shabankamel/android\"\n        }\n    }\ndependencies {\n    implemetation 'com.sha.kamel:phonefield:1.2.1@aar'\n}\n```\n\n# Usage:\n\n```java\n  @Override\n  protected void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n    setContentView(R.layout.activity_main);\n\n    final PhoneInputLayout phoneInputLayout = findViewById(R.id.phone_input_layout);\n    final PhoneEditText phoneEditText = findViewById(R.id.edit_text);\n\n    // Must call init, else, you'll get IllegalStateException when clicking country view.\n    phoneInputLayout.init(this);\n    phoneEditText.init(this);\n\n    final Button button = findViewById(R.id.submit_button);\n\n    phoneInputLayout.setHint(R.string.phone_hint);\n    phoneInputLayout.setDefaultCountry(\"EG\");\n\n    phoneEditText.setHint(R.string.phone_hint);\n    phoneEditText.setDefaultCountry(\"FR\");\n\n    button.setOnClickListener(v -\u003e {\n      boolean valid = true;\n      if (phoneInputLayout.isValid()) {\n        phoneInputLayout.setError(null);\n      } else {\n        phoneInputLayout.setError(getString(R.string.invalid_phone_number));\n        valid = false;\n      }\n\n      if (phoneEditText.isValid()) {\n        phoneEditText.setError(null);\n      } else {\n        phoneEditText.setError(getString(R.string.invalid_phone_number));\n        valid = false;\n      }\n\n      if (valid) {\n        toast(R.string.valid_phone_number);\n      } else {\n        toast(R.string.invalid_phone_number);\n      }\n    });\n  }\n\n  private void toast(int res) {\n    Toast.makeText(this, res, Toast.LENGTH_LONG).show();\n  }\n  \n```\n\n### See 'app' module for the full code.\n\n# License\n\n## Apache license 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalekkamel%2Fphone-field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalekkamel%2Fphone-field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalekkamel%2Fphone-field/lists"}