14 |
|
|
15 |
public class DepartureListAdapter extends BaseAdapter { |
public class DepartureListAdapter extends BaseAdapter { |
16 |
|
|
17 |
private List<DepartureBean> departures; |
private List<DepartureEntry> departures; |
18 |
LayoutInflater inflater; |
LayoutInflater inflater; |
19 |
Context context; |
Context context; |
20 |
|
|
31 |
|
|
32 |
} |
} |
33 |
|
|
34 |
public void setDepartures(List<DepartureBean> departures) { |
public void setDepartures(List<DepartureEntry> departures) { |
35 |
this.departures = departures; |
this.departures = departures; |
36 |
notifyDataSetChanged(); |
notifyDataSetChanged(); |
37 |
} |
} |
44 |
return 0; |
return 0; |
45 |
} |
} |
46 |
|
|
47 |
public DepartureBean getDeparture(int position) { |
public DepartureEntry getDeparture(int position) { |
48 |
return departures.get(position); |
return departures.get(position); |
49 |
} |
} |
50 |
|
|
60 |
|
|
61 |
@Override |
@Override |
62 |
public View getView(int position, View convertView, ViewGroup parent) { |
public View getView(int position, View convertView, ViewGroup parent) { |
63 |
DepartureBean station = departures.get(position); |
DepartureEntry station = departures.get(position); |
64 |
|
|
65 |
View root = inflater.inflate(R.layout.departurerow , parent, false); |
View root = inflater.inflate(R.layout.departurerow , parent, false); |
66 |
|
|