diff --git a/README.md b/README.md index 7b45bcc..57c5339 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,10 @@ Country's list with flag image. Can launch this activity to show the list of cou How to add to your project -------------- +Sample implementation gif file for country selection and using search functionality + + + Add repository info in your root project gradle file ```gradle @@ -35,25 +39,22 @@ startActivityForResult( Intent(context, CountrySearchActivity::class.java), Requ You will receive your result once the user is selected the country ```java - override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { - super.onActivityResult(requestCode, resultCode, data) - - if (requestCode == RequestCode.COUNTRY_SEARCH_CODE && resultCode == Activity.RESULT_OK) { - - data?.apply { - - val country: CountryModel? = getParcelableExtra(RequestParam.SELECTED_VALUE) - - if (country != null) { - Snackbar.make( - button, - "Selected Country [ name, code ] [${country.countryName} , ${country.countryCode}]", - Snackbar.LENGTH_SHORT - ).show() - } +override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { + super.onActivityResult(requestCode, resultCode, data) + + if (requestCode == RequestCode.COUNTRY_SEARCH_CODE && resultCode == Activity.RESULT_OK) { + data?.apply { + val country: CountryModel? = getParcelableExtra(RequestParam.SELECTED_VALUE) + if (country != null) { + Snackbar.make( + button, + "Selected Country [ name, code ] [${country.countryName} , ${country.countryCode}]", + Snackbar.LENGTH_SHORT + ).show() } } } +} ```