Coder Social home page Coder Social logo

parveshsandila / countrycodechooser Goto Github PK

View Code? Open in Web Editor NEW
14.0 1.0 1.0 2.5 MB

Country code chooser in Jetpack compose

Home Page: https://owlbuddy.com

Kotlin 100.00%
compose country-code-picker country-codes countrycodepicker countrycodesearch jetpack jetpack-android jetpack-compose library

countrycodechooser's Introduction

Country Code Chooser (Jetpack Compose)

GitHub stars GitHub issues

The Android library is designed to provide a user-friendly interface for selecting country codes from various countries. The library is specifically built to work seamlessly with Android Jetpack Compose, allowing developers to quickly and easily integrate it into their projects.

One of the standout features of this library is its built-in support for displaying a flag for each country. This is especially useful when building international apps where users may not be familiar with the country codes of other regions.

The library offers a range of customization options, allowing developers to tailor the user interface to match their app's design. For example, developers can customize the TextFiled, font styles, and sizes of the text.

Example Code:-

 CountryCodeChooser(
    modifier = Modifier
        .weight(1.5f)
        .height(55.dp)
        .border(
           width = 1.dp,
           shape = RoundedCornerShape(5.dp),
           color = Color.Gray
        ),
    defaultCountry = "CA",
    countryCodeType = CountryCodeType.FLAG,
    onCountySelected = { countryCodeWithoutPrefix, iso2Code, iso3Code ->
        Log.d("SelectedCountry","$countryCodeWithoutPrefix, $iso2Code, $iso3Code")
    }
)

Preview:-

Jetpack compose Lazy column example Jetpack compose Lazy column example Jetpack compose Lazy column example Jetpack compose Lazy column example Jetpack compose Lazy column example

Like this? Spread ❤️ by adding a ⭐ on this project.

Features:-

  • Easy to use
  • Customizable
  • Three different view options : Text with prefix, Text without prefix, and Only Flag
  • Can search using country name or code
  • Support languages:
    • Arabic
    • Chinese
    • English
    • French
    • German
    • Hindi
    • Italian
    • Japanese
    • Korean
    • Portuguese
    • Punjabi
    • Spanish

Other languages coming soon

How to use:-

To get a Git project into your build: Step 1. Add the JitPack repository to your build file
allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}

Step 2. Add the dependency

dependencies {
    implementation 'com.github.ParveshSandila:CountryCodeChooser:1.0.2'
}

Click here to check on jitpack.io

Language Contributions:-

Contributions

Contributions to the CountryCodeChooser library are highly appreciated! If you have any bug fixes, new features, or improvements to offer, please feel free to submit a pull request. Together, we can make this library even better.

Contact

For any inquiries or support regarding the library, you can reach out to the author, Parvesh Sandila, via email at [email protected].

Let the CountryCodeChooser Android Library enhance your app with seamless country code selection. Download it now and give your users a convenient and efficient experience.

#AndroidDevelopment #CountryCodeSelection #OpenSourceLibrary #CountryCodeChooser #JetpackCompose #ComposeLibraray

License

Apache Version 2.0

Copyright (C) 2023 Parvesh Sandila

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.

countrycodechooser's People

Contributors

guilhe avatar parveshsandila avatar vjubert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

guilhe

countrycodechooser's Issues

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.