【发布时间】:2016-04-04 10:00:36
【问题描述】:
谁能帮我获取国家列表和城市列表? 有没有 google Api 来获取这些列表?
【问题讨论】:
标签: android google-api
谁能帮我获取国家列表和城市列表? 有没有 google Api 来获取这些列表?
【问题讨论】:
标签: android google-api
试试这个:
ArrayList<String> list=new ArrayList<String>();
String[] locales = Locale.getISOCountries();
for (String countryCode : locales) {
Locale obj = new Locale("", countryCode);
System.out.println("Country Name = " + obj.getDisplayCountry());
list.add(obj.getDisplayCountry());
}
并将列表设置为适配器。
我认为要获得城市,您必须使用网络服务。
参考这些链接:
【讨论】: