/[projects]/android/TrainInfo/src/dk/thoerup/traininfo/TimetableListAdapter.java
ViewVC logotype

Diff of /android/TrainInfo/src/dk/thoerup/traininfo/TimetableListAdapter.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 365 by torben, Wed Sep 30 09:14:27 2009 UTC revision 490 by torben, Thu Oct 29 19:27:29 2009 UTC
# Line 16  public class TimetableListAdapter extend Line 16  public class TimetableListAdapter extend
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;
# Line 50  public class TimetableListAdapter extend Line 55  public class TimetableListAdapter extend
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());
# Line 70  public class TimetableListAdapter extend Line 80  public class TimetableListAdapter extend
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;

Legend:
Removed from v.365  
changed lines
  Added in v.490

  ViewVC Help
Powered by ViewVC 1.1.20