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