Created
November 2, 2018 17:09
-
-
Save badarshahzad/f025bdd4f52f894c0d3a0ea263d42130 to your computer and use it in GitHub Desktop.
Android Snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Get the all countries name | |
public static ArrayList<String> getCountriesName() { | |
ArrayList<String> list = new ArrayList<String>(); | |
String[] locales = Locale.getISOCountries(); | |
for (String countryCode : locales) { | |
Locale obj = new Locale("", countryCode); | |
//Log.i(TAG, "Country Name = " + obj.getDisplayCountry()); | |
list.add(obj.getDisplayCountry()); | |
} | |
return list; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment