How to get currency code, currency name, country name, country code ISO2 ISO3 in a Arraylist?

249 Views Asked by At

Hi all i searched a lot to find a way to get a list of all the codes that belongs to a country like Country name, country code Phone code, currency name currency code. I was not able to find the full list. So i made one and wanted to share with you incase you are also searching for this.

  1. Create in your values folder a new Value resource file
  2. Paste the code below.
  3. you can use it as arraylist

the file is available on git

-----LINK TO FILE----

1

There are 1 best solutions below

0
mr_Sadow On

Preview:

<

<resources>
    <string-array name="country_data">
        <item>
            <country>Afghanistan</country>
            <countryCode>93</countryCode>
            <iso2>AF</iso2>
            <iso3>AFG</iso3>
            <currencyName>Afghani</currencyName>
            <currencyCode>AFN</currencyCode>
        </item>
    <item>
            <country>Albania</country>
            <countryCode>355</countryCode>
            <iso2>AL</iso2>
            <iso3>ALB</iso3>
            <currencyName>Lek</currencyName>
            <currencyCode>ALL</currencyCode>
        </item>
    <item>
            <country>Algeria</country>
            <countryCode>213</countryCode>
            <iso2>DZ</iso2>
            <iso3>DZA</iso3>
            <currencyName>Algerian Dinar</currencyName>
            <currencyCode>DZD</currencyCode>
        </item>