Step 1. Add the JitPack repository to your build file
Add it in your root build.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.hbb20:countrycodepickerproject:2.4.2'
}
<dependency>
<groupId>com.github.hbb20</groupId>
<artifactId>countrycodepickerproject</artifactId>
<version>2.4.2</version>
</dependency>
libraryDependencies += "com.github.hbb20" % "countrycodepickerproject" % "2.4.2"
:dependencies [[com.github.hbb20/countrycodepickerproject "2.4.2"]]
If you are looking for an android library for Country Selector or Country Spinner or Country Phone Code selector, this is the perfect place for you.
Country Code Picker (CCP) <img src="https://farm6.staticflickr.com/5726/30960801342_6e65c7ddd5_m.jpg" width="100"> or <img src="https://farm5.staticflickr.com/4468/23591251898_f8c5e8393a_b.jpg" width="230"> is an android library which provides an easy way to search and select country or country phone code for the telephone number.
Give a professional touch to your well designed form like login screen, sign up screen, edit profile screen with CCP. When used as phone code picker, it helps by removing confusion about how to add phone number and making view more understandable.
With CCP you can get following views easily without boilerplate code. (Left: Phone code selector. Right: Country Selector)
Tapping on CCP will open a dialog to search and select country (Left: Phone code selector. Right: Country Selector) - <img src="https://farm6.staticflickr.com/5686/30982885732_9e91ede573_b.jpg" width="300"> <img src="https://farm5.staticflickr.com/4384/37440899521_d19781dc52_b.jpg" width="300">
Add this to your gradle file and sync. See CHANGELOG for detailed list of changes.
dependencies {
implementation 'com.hbb20:ccp:X.Y.Z'
}
If you prefer experience along with explanations, an demo android app is available that demonstrates all the features of this library. Click below button to download from Playstore. <br/><a href="https://goo.gl/zI2cY2"><img src="https://raw.githubusercontent.com/hbb20/CountryCodePickerProject/master/playstore.jpeg"/></a>
To check all xml properties available for CCP and CCP Selection ppDialog, please visit the wiki page.
Copyright (C) 2016 Harsh Bhakta
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.