Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ParveshSandila committed May 2, 2023
2 parents 0de077c + 0479fd5 commit 9d7b5c5
Showing 1 changed file with 90 additions and 0 deletions.
90 changes: 90 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<h1>Country Code Chooser (Jetpack Compose)</h1>

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.

<h2>Example Code:- </h2>

```kotlin
CountryCodeChooser(
modifier = Modifier
.weight(1.5f)
.height(55.dp)
.border(
width = 1.dp,
shape = RoundedCornerShape(5.dp),
color = Color.Gray
),
defaultCountryCode = "1",
countryCodeType = CountryCodeType.FLAG,
onCountyCodeSelected = { code, codeWithPrefix ->
Log.d("SelectedCountry","$code, $codeWithPrefix")
}
)
```

<h2>Preview:- </h2>

<span style="margin:25px">
<img src="https://github.com/ParveshSandila/CountryCodeChooser/blob/master/app/src/main/res/drawable/ss_1.jpg"
alt="Jetpack compose Lazy column example" style="height:300px"/>
</span>
<span style="margin:25px">
<img src="https://github.com/ParveshSandila/CountryCodeChooser/blob/master/app/src/main/res/drawable/ss_2.jpg"
alt="Jetpack compose Lazy column example"
style="height:300px"
/>
<span style="margin:25px">
<img src="https://github.com/ParveshSandila/CountryCodeChooser/blob/master/app/src/main/res/drawable/ss_3.jpg"
alt="Jetpack compose Lazy column example"
style="height:300px"
/>
<span style="margin:25px">
<img src="https://github.com/ParveshSandila/CountryCodeChooser/blob/master/app/src/main/res/drawable/ss_4.jpg"
alt="Jetpack compose Lazy column example"
style="height:300px"
/>
<span style="margin:25px">
<img src="https://github.com/ParveshSandila/CountryCodeChooser/blob/master/app/src/main/res/drawable/ss_5.jpg"
alt="Jetpack compose Lazy column example"
style="height:300px"
/>
</span>

<h2>Features:- </h2>
<ul>
<li>Easy to use</li>
<li>Customizable</li>
<li>Three differnt view options : Text with prefix, Text without prefix, and Only Flag</li>
<li>Can search using country name or code</li>
<li>Supoport languages such as : English, Korean, Spanish, Chinese</li>
</ul>

*Other laguages coming soon*



<h2>How to use:- </h2>
To get a Git project into your build:
Step 1. Add the JitPack repository to your build file

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

Step 2. Add the dependency

```kotlin
dependencies {
implementation 'com.github.ParveshSandila:CountryCodeChooser:1.0'
}
```
<a href="https://jitpack.io/#ParveshSandila/CountryCodeChooser" target="_black">Click here to check on jitpack.io</a>

0 comments on commit 9d7b5c5

Please sign in to comment.