カスタムアダプタで展開可能なリストビューがあり、展開可能なリストの詳細が順番に表示されず、デバイス間で変更される?カスタム拡張可能なリストを表示する内容を表示する
ここではそのうちの一つの内容の例です:それは、
public static HashMap<String, List<String>> getinfoE() {
HashMap<String, List<String>> expandableListDetail = new HashMap<String, List<String>>();
List<String> m1 = new ArrayList<String>();
m1.add("Princess Noura Bint Abdulrahman University established Arabic Teaching Institute for Non-Arabic speakers on November 3, 2012, with the consent of the Custodian of the Two Holy Mosques King Abdullah bin Abdulaziz Al Saud, may God have mercy on him, and since that time the institute was keen to complete the vision and the necessary preparations to be a distinctive scientific edifice in teaching Arabic language for non-Arabic speakers.");
List<String> m2 = new ArrayList<String>();
m2.add("International Leadership in Arabic Language Teaching for non-Arabic speakers utilizing specialized programs and technologies.");
List<String> m3 = new ArrayList<String>();
m3.add("Learning and teaching Arabic language for Non-Arabic speakers in a distinctive academic environment having excellent, highly qualified and highly educated female faculty, by providing academic and training programs, that always consider the Saudi culture and human principles.");
List<String> m4 = new ArrayList<String>();
m4.add("-\tProviding students with high level language skills. \n" +
"-\tProviding students with the Saudi and Islamic culture for those who need it. \n" +
"-\tDeveloping the students educationally and personally throughout some supportive programs and workshops. \n" +
"-\tOffering material and moral support to the students to achieve projects that are helpful for the Arabic language and the institution. \n" +
"-\tProviding international social service by providing specialized programs to improve their individuals Arabic language for both general and specific purposes. \n" +
"-\tSupporting the cultural dialogue and diversity between different nations within the limits of human values. \n" +
"-\tEncouraging research and studies in the area of specialization.\n");
List<String> m5 = new ArrayList<String>();
m5.add("The Institute has expert female instructors who are specialized in Applied linguistics and teaching Arabic language as a second language. Moreover, it has a skilled administrative staff alongside with a great number of students with various nationalities.");
List<String> m6 = new ArrayList<String>();
m6.add("The Institute is considered as an international cultural gate in Saudi Arabia since its students come from different countries and cultures. Proudly, the institute contains different nationalities which belong to Africa, Asia, Europe, and North America.");
expandableListDetail.put("About The Institute", m1);
expandableListDetail.put("The Institute vision", m2);
expandableListDetail.put("The Institute mission", m3);
expandableListDetail.put("The Institute goals", m4);
expandableListDetail.put("The Institute faculties", m5);
expandableListDetail.put("The Institute students", m6);
これは、私はそれがM1、M2、M3として注文することにしたい、私が欲しい順に表示されません...しかし、ランダムに表示し続ける。
これを解決するにはどうすればよいですか?
...それは、挿入秩序を維持するのLinkedHashMapを使用してみてください。 –