Skip to content

How to integrate into your project

Harsh B. Bhakta edited this page Oct 25, 2019 · 10 revisions
  1. Add this to your Gradle file and sync

      dependencies {
        implementation 'com.hbb20:ccp:X.Y.Z'
      }

    *Check latest version from README file.

  2. Add CCP view to XML layout

      <com.hbb20.CountryCodePicker
        android:id="@+id/ccp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />
  3. Add CCP object in Activity / Fragment

      CountryCodePicker ccp;
    
  4. Bind CCP from layout

      ccp = (CountryCodePicker) findViewById(R.id.ccp);
    
  5. That's it. Run the project and see the results.

  6. To blend CCP with your project's theme style, you can modify CCP Theme and CCP Dialog Theme

Clone this wiki locally