16 |
LayoutInflater inflater; |
LayoutInflater inflater; |
17 |
Context context; |
Context context; |
18 |
|
|
19 |
|
@Override |
20 |
|
public boolean isEnabled(int position) { |
21 |
|
return false; |
22 |
|
} |
23 |
|
|
24 |
public TimetableListAdapter(Context context) { |
public TimetableListAdapter(Context context) { |
25 |
super(); |
super(); |
26 |
this.context = context; |
this.context = context; |
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()); |
80 |
arrival.setTextColor(fgcolor); |
arrival.setTextColor(fgcolor); |
81 |
departure.setTextColor(fgcolor); |
departure.setTextColor(fgcolor); |
82 |
root.setBackgroundColor(bgcolor); |
root.setBackgroundColor(bgcolor); |
|
|
|
|
Log.e("Current","current"); |
|
83 |
} |
} |
84 |
|
|
85 |
return root; |
return root; |