-
-
Notifications
You must be signed in to change notification settings - Fork 507
How to integrate into your project
Harsh B. Bhakta edited this page Oct 25, 2019
·
10 revisions
-
Add this to your Gradle file and sync
dependencies { implementation 'com.hbb20:ccp:X.Y.Z' }
*Check latest version from README file.
-
Add CCP view to XML layout
<com.hbb20.CountryCodePicker android:id="@+id/ccp" android:layout_width="wrap_content" android:layout_height="wrap_content" />
-
Add CCP object in Activity / Fragment
CountryCodePicker ccp;
-
Bind CCP from layout
ccp = (CountryCodePicker) findViewById(R.id.ccp);
-
That's it. Run the project and see the results.
-
To blend CCP with your project's theme style, you can modify CCP Theme and CCP Dialog Theme
- How to Integrate into your project
- Full Number Support
- Use as a Country Selector
- Auto detect country
- Auto detect language
- Remember last selection
- Country Preference
- Custom Mater List
- Exclude Countries
- Example phonenumber as hint
- Multi Language Support
- Default Country
- Country Selection Listener
- Dialog events listener
- CCP Theme Customization
- CCP Dialog Theme Customization
- Custom TypeFace
- Read Selected Country
- XML Properties
- Update Guide to v2
- Guide to Add New Language Support
- Guide to add New Country
- Change contry names for local project
- Handle CCP ClickListener Manually
- Custom Dialog Title/Hint/Empty Result ACK
- Flag Emoji Support (BETA)
- Change Log