Skip to content

Country Code Picker (CCP) or is an android library Jetpack Compose which provides an easy way to search and select country or country phone code for the telephone number.

appleader707/country-code-picker-compose

Repository files navigation

CountryCodePickerJetpackCompose

Country Code Picker by Jetpack Compose

How to add in your project

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency

dependencies {
        implementation 'com.github.appleader707:country-code-picker-compose:1.0'
}

How to use ?

val countryCode = CountryCodePicker() // create a new Object
countryCode.CountryCodeDialog(
     pickedCountry = {
         Log.v("TAG", "country name is : ${it.countryName}")
     },
     defaultSelectedCountry = getListCountries().single { it.countryCode == "ir" },
     dialogSearch = true,
     dialogRounded = 22
 )

Preview

This is an image preview

This is an image preview

About

Country Code Picker (CCP) or is an android library Jetpack Compose which provides an easy way to search and select country or country phone code for the telephone number.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages