Hi,
ich habe 2 listViews in denen jeweils ein Array ausgegeben werden soll.
Die Stammdaten aus denen die beiden Arrays erstellt werden, sind dieselben.
In der zweiten ListView wird das Array normal ausgegeben. Die erste ListView ist einfach leer.
Sieht jemand einen Fehler? Ich finde nichts...oder ich bin blind.
Java
if (input.equals("home")){
if ((game_datum.equals(dateFormat.format(currdate)) && (goalhome.equals("1"))))
{
counthome++;
EntryGoal goal1 = new EntryGoal();
goal1.setGame_datum(game_datum);
goal1.setPlayer_passnumber(player_passnumber);
goal1.setMinute(minute);
goal1.setTeam(team);
goal1.setName(name);
goalListHome.add(goal1);
}
TextView editgoal1 =(TextView)findViewById(R.id.goal1);
editgoal1.setText(Integer.toString(counthome));
ArrayAdapter<EntryGoal> adapter1 = new ArrayAdapter<EntryGoal>(Live.this, R.layout.goallistitem, goalListHome);
ListView lGoal1 = (ListView) findViewById(R.id.listViewHome);
lGoal1.setAdapter(adapter1);
adapter1.notifyDataSetChanged();
}
if (input.equals("guest")){
if ((game_datum.equals(dateFormat.format(currdate)) && (goalguest.equals("1"))))
{
countguest++;
EntryGoal goal2 = new EntryGoal();
goal2.setGame_datum(game_datum);
goal2.setPlayer_passnumber(player_passnumber);
goal2.setMinute(minute);
goal2.setTeam(team);
goal2.setName(name);
goalListGuest.add(goal2);
}
TextView editgoal2 =(TextView)findViewById(R.id.goal2);
editgoal2.setText(Integer.toString(countguest));
ArrayAdapter<EntryGoal> adapter2 = new ArrayAdapter<EntryGoal>(Live.this, R.layout.goallistitem, goalListGuest);
ListView lGoal2 = (ListView) findViewById(R.id.listViewGuest);
lGoal2.setAdapter(adapter2);
adapter2.notifyDataSetChanged();
Alles anzeigen
Vielen Dank schonmal
Gruß
M3doXX