3 |
import java.util.List; |
import java.util.List; |
4 |
|
|
5 |
import android.content.Context; |
import android.content.Context; |
6 |
|
import android.util.Log; |
7 |
import android.view.LayoutInflater; |
import android.view.LayoutInflater; |
8 |
import android.view.View; |
import android.view.View; |
9 |
import android.view.ViewGroup; |
import android.view.ViewGroup; |
55 |
public View getView(int position, View convertView, ViewGroup parent) { |
public View getView(int position, View convertView, ViewGroup parent) { |
56 |
TimetableBean timetableBean = timetable.get(position); |
TimetableBean timetableBean = timetable.get(position); |
57 |
|
|
58 |
View root = inflater.inflate(R.layout.timetablerow , parent, false); |
View root; |
59 |
|
if (convertView == null || convertView.getId() != R.id.TimetableRow) { |
60 |
|
root = inflater.inflate(R.layout.timetablerow , parent, false); |
61 |
|
} else { |
62 |
|
root = convertView; |
63 |
|
} |
64 |
|
|
65 |
TextView station = (TextView) root.findViewById(R.id.Station); |
TextView station = (TextView) root.findViewById(R.id.Station); |
66 |
station.setText(timetableBean.getStation()); |
station.setText(timetableBean.getStation()); |