Niz*_*ami 7 android google-maps google-api android-spinner
这有可能加载微调器中所有国家的列表,然后在选择特定国家时,其所有城市都出现在另一个微调器中,选择城市后,我们使用google在android中获取该城市的区域或城镇列表-api或类似国家/地区选择器的内容?目前,我正在使用它来获取国家列表。但是如何获得各自的城镇?
ArrayList<String> list=new ArrayList<String>();
String[] locales = Locale.getISOCountries();
for (String countryCode : locales) {
Locale obj = new Locale("", countryCode);
list.add(obj.getDisplayCountry());
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5791 次 |
| 最近记录: |