/[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 490 by torben, Thu Oct 29 19:27:29 2009 UTC revision 491 by torben, Thu Oct 29 19:50:02 2009 UTC
# Line 3  package dk.thoerup.traininfo; Line 3  package dk.thoerup.traininfo;
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;
# Line 55  public class TimetableListAdapter extend Line 54  public class TimetableListAdapter extend
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());

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

  ViewVC Help
Powered by ViewVC 1.1.20