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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 362 - (hide annotations) (download)
Tue Sep 29 21:30:16 2009 UTC (14 years, 8 months ago) by torben
File size: 1057 byte(s)
CodeSync towards timetable feature
1 torben 362 package dk.thoerup.traininfo;
2    
3     import java.util.List;
4    
5     import android.content.Context;
6     import android.view.LayoutInflater;
7     import android.view.View;
8     import android.view.ViewGroup;
9     import android.widget.BaseAdapter;
10    
11     public class TimetableListAdapter extends BaseAdapter {
12    
13     private List<TimetableBean> timetable;
14     LayoutInflater inflater;
15     Context context;
16    
17     public TimetableListAdapter(Context context) {
18     super();
19     this.context = context;
20    
21     inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
22     }
23    
24     public void setTimetable(List<TimetableBean> timetable) {
25     this.timetable = timetable;
26     notifyDataSetChanged();
27     }
28    
29     @Override
30     public int getCount() {
31     if (timetable != null)
32     return timetable.size();
33     else
34     return 0;
35     }
36    
37     @Override
38     public Object getItem(int position) {
39     return null;
40     }
41    
42     @Override
43     public long getItemId(int position) {
44     return position;
45     }
46    
47     @Override
48     public View getView(int position, View convertView, ViewGroup parent) {
49     // TODO Auto-generated method stub
50     return null;
51     }
52    
53     }

  ViewVC Help
Powered by ViewVC 1.1.20