I'm new to android and developing an app which shows the country list with its flag in a GridView, I'm using TimeZone.getAvailableIDs()
to get the countries name, but don't have any idea how to get the flag images.
Can anyone tell me how to get the flags with country name or using country code.
Asked
Active
Viewed 1,782 times
0

RBT
- 24,161
- 21
- 159
- 240

Saurabh Verma
- 21
- 3
-
check this answer [Android Countries list with....](http://stackoverflow.com/questions/20519675/android-countries-list-with-flags-and-availability-of-getting-iso-mobile-codes) – Arash Sep 03 '16 at 06:47
1 Answers
0
You have few ways of doing it.
1. Create a Hashmap
in which you will keep country name and image, and according to country name fetch your image from HashMap.
2. If you have images in your drawable
folder then keep image name same according to the name that you will get from TimeZone and then load that particular image from drawable folder.

Vivek Mishra
- 5,669
- 9
- 46
- 84