1
안녕하세요 제 코드는 ArrayList의 마지막 요소 만 보여줍니다! Heres는 내 코드 :안드로이드리스트 뷰는 ArrayList의 마지막 요소를 표시합니다.
ListView list = (ListView) findViewById(R.id.t1player_statsList);
ArrayList<HashMap<String, String>> mylist = new ArrayList<HashMap<String, String>>();
HashMap<String, String> map = new HashMap<String, String>();
for(Player player : team1.getPlayers())
map.put("player", player.getName());
map.put("score", "0");
mylist.add(map);
SimpleAdapter mSchedule = new SimpleAdapter(this, mylist, R.layout.mylistrow,
new String[] {"player", "score"}, new int[] {R.id.NameCell, R.id.ScoreCell});
list.setAdapter(mSchedule);
내가 그 무언가가 내 루프와 함께 할 생각합니다. 누군가 도와주세요! 미리 감사드립니다!
+1 멋진 캐치 ... –
고맙습니다. 그것은 일했다! –
굉장! 이것은 매력처럼 작동했습니다. 거의 하루 종일 디버깅 중이 었어. 고마워. @Lalit Poptani. – buggydroid