5 |
import java.util.Map; |
import java.util.Map; |
6 |
|
|
7 |
import android.content.Context; |
import android.content.Context; |
|
import android.util.Log; |
|
8 |
import android.view.LayoutInflater; |
import android.view.LayoutInflater; |
9 |
import android.view.View; |
import android.view.View; |
10 |
import android.view.ViewGroup; |
import android.view.ViewGroup; |
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); |
DepartureBean station = departures.get(position); |
64 |
|
|
65 |
|
View root = inflater.inflate(R.layout.departurerow , parent, false); |
|
View root; |
|
|
if (convertView == null || convertView.getId() != R.id.DepartureRow ) { |
|
|
root = inflater.inflate(R.layout.departurerow , parent, false); |
|
|
} else { |
|
|
root = convertView; |
|
|
} |
|
|
|
|
66 |
|
|
67 |
((TextView) root.findViewById(R.id.Time)).setText(station.getTime()); |
((TextView) root.findViewById(R.id.Time)).setText(station.getTime()); |
68 |
((TextView) root.findViewById(R.id.Destination)).setText(station.getDestination()); |
((TextView) root.findViewById(R.id.Destination)).setText(station.getDestination()); |