GithubHelp home page GithubHelp logo

lkant8 / country-code-picker Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 1.0 1.47 MB

Jetpack compose country code picker (CCP) is an android library which provides an easy way to search and select country or international phone code. Also supports Android EditText phone mask and international phone validation.

Home Page: https://www.buymeacoffee.com/mcode

License: Apache License 2.0

Kotlin 100.00%
android-library jetpack jetpack-compose kotlin-android kotlin-library country country-codes country-flags country-picker countrycode countrycode-picker countrycodepicker international library mobile-app

country-code-picker's Introduction

Jetpack Compose Country Code Picker

Jetpack Compose Country Code Picker

Buy Me A Coffee

https://github.com/mcode8/Country-Code-picker/blob/main/screenshot/Screenshot%202022-12-29%20141313.png

Updated

If you are looking for Country Phone Code Picker for Jetpack Compose you can use the package.

  • Country numbers hints
  • Automatic country recognition With Local
  • With TextField
  • Can Customize
  • Added clear text button
  • Dialog changed

Languages:

  • English

Screenshot

https://github.com/mcode8/Country-Code-picker/blob/main/screenshot/Screenshot%202022-12-29%20141313.png https://github.com/mcode8/Country-Code-picker/blob/main/screenshot/ios.png

USAGE

@Composable
 CountryTextField(
                label = stringResource(R.string.select_country_text),
                modifier = Modifier
                    .padding(top = 50.dp)
                    .align(Alignment.TopCenter),
                expanded = expanded,
                selectedCountry = selectedCountry,
                defaultSelectedCountry = countryList(LocalContext.current).single { it.code == "IN" }
            ) {
	    
	    }

EXAMPLE

How to add in your project

To get a Git project into your build:
Step 1. Add the JitPack repository to your build file

Gradle

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.codewith-fun:Country-Code-picker:0.1.1'
	}

Maven

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

<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Step 2.

Add the dependency

<dependency>
	    <groupId>com.github.codewith-fun</groupId>
	    <artifactId>Country-Code-picker</artifactId>
	    <version>0.1.1</version>
	</dependency>

sbt

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

resolvers += "jitpack" at "https://jitpack.io"

Step 2.

Add the dependency

libraryDependencies += "com.github.codewith-fun" % "Country-Code-picker" % "0.1.1"	

leiningen

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

 :repositories [["jitpack" "https://jitpack.io"]]

Step 2.

Add the dependency

	:dependencies [[com.github.codewith-fun/Country-Code-picker "0.1.1"]]	

License

Apache Version 2.0

Copyright (C) 2022 Codewith-fun

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.

country-code-picker's People

Contributors

lkant8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

sachinkumar53

country-code-picker's Issues

search country

When searching country then country code and flags are miss-matched
It's working properly but in the search list it different

Smartphone (please complete the following information):

  • Device: [emulator foldable]
  • API 31

Issue: Feature request

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Bug report

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See the error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.