| | |
| | | return idMap.get(name);
|
| | | }
|
| | |
|
| | | public static List<String> nationList = new ArrayList<String>();
|
| | | public static List<String> mCredentialsList = new ArrayList<String>();
|
| | | public static List<String> genderList = new ArrayList<String>();
|
| | | public static List<String> uniqueFirstLetterList = new ArrayList<String>();
|
| | | public static HashMap<String,List<String>> countriesGroupByFirstLetter = new HashMap<String,List<String>>();
|
| | | public static String[] countryWordData = new String[]{};
|
| | | public static List<String> visitReasonList = new ArrayList<String>();
|
| | |
|
| | | public void loadAllDictionaryData() {
|
| | | loadCountries();
|
| | | loadIdTypeList();
|
| | |
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | List<Dictionary> items = getList(Dictionary.class);
|
| | | countryWordData = new String[items.size()];
|
| | | int i=0;
|
| | | List<String> uniqueFirstLetterList = new ArrayList<String>();
|
| | | HashMap<String,List<String>> countriesGroupByFirstLetter = new HashMap<String,List<String>>();
|
| | | for (Dictionary item : items) {
|
| | | idMap.put(item.getName(), item.getId()+"");
|
| | | nationList.add(item.getName());
|
| | | String firstLetter = item.getRemark();
|
| | | List list = countriesGroupByFirstLetter.get(firstLetter);
|
| | | if (list == null) {
|
| | |
| | | uniqueFirstLetterList.add(0, firstLetter);
|
| | | }
|
| | | list.add(item.getName());
|
| | | countryWordData[i] = item.getName();
|
| | | i++;
|
| | | }
|
| | | CountryDialog.setCountries(uniqueFirstLetterList, countriesGroupByFirstLetter);
|