Skip to content

eslam2010011/FastCountryPicker

Repository files navigation

FastCountryPicker

An android library for listing all the countries and user can select the country name, code, dial code and flag. auto select country code

stack Overflow

Bugevil.-.Facebook_2.mp4

stack Overflow

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

dependencies {
          implementation 'com.github.eslam2010011:FastCountryPicker:1'
  }
# Step 3
<com.fastcountrycode.widget.FastCountryCodeM
     android:id="@+id/fab"
     android:gravity="center"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_gravity="center"
      />
      
      /////////////////////
      
       <com.fastcountrycode.widget.FastCountryCodeOnlyM
      android:gravity="center"
     android:id="@+id/cancel_button"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_gravity="center"
     />
     
     ```

   # Step 4
   
      ```html

       FastCountryCodeOnlyM fastcountrycode =findViewById(R.id.fastcountrycode);
       
       fastcountrycode.getCountry_().getDialCode()
       //or
       fastcountrycode.setCountryPickerListener(new CountryPickerListener() {
         @Override
         public void onSelectCountry(Country country) {
             textView.setText(country.getDialCode());
         }
     });

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages