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

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

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

revision 840 by torben, Fri Jun 11 18:46:46 2010 UTC revision 918 by torben, Sat Jun 26 11:02:53 2010 UTC
# Line 67  public class TimetableList extends ListA Line 67  public class TimetableList extends ListA
67                          adapter.setTimetable(timetables);                          adapter.setTimetable(timetables);
68                  }                  }
69          }          }
70            
71            @Override
72            protected void onDestroy() {
73                    super.onDestroy();
74                    
75                    if (fetcher != null) {
76                            fetcher.cancel(true);
77                    }
78            }
79                    
80      @Override      @Override
81          protected void onListItemClick(ListView l, View v, int position, long id) {          protected void onListItemClick(ListView l, View v, int position, long id) {
# Line 137  public class TimetableList extends ListA Line 145  public class TimetableList extends ListA
145                    
146                                                    
147                          if (success) {                          if (success) {
148                                    TimetableList.this.getListView().invalidateViews();
149                                  adapter.setTimetable(timetables);                                  adapter.setTimetable(timetables);
150                                  if (timetables.size() == 0) {                                  if (timetables.size() == 0) {
151                                          MessageBox.showMessage(TimetableList.this, getString(timetablelist_nodata));                                          MessageBox.showMessage(TimetableList.this, getString(timetablelist_nodata), true);
152                                  }                                  }
153                          } else { // communication or parse error                          } else { // communication or parse error
154                                  AlertDialog.Builder builder = new AlertDialog.Builder(TimetableList.this);                                                                                AlertDialog.Builder builder = new AlertDialog.Builder(TimetableList.this);                                              
# Line 155  public class TimetableList extends ListA Line 164  public class TimetableList extends ListA
164                                  builder.setNegativeButton(getString(generic_cancel), new DialogInterface.OnClickListener() {                                  builder.setNegativeButton(getString(generic_cancel), new DialogInterface.OnClickListener() {
165                                          public void onClick(DialogInterface dialog, int id) {                                          public void onClick(DialogInterface dialog, int id) {
166                                                  dialog.dismiss();                                                  dialog.dismiss();
167                                                    TimetableList.this.finish();
168                                          }                                                                                                }                                                      
169                                  });                                  });
170                                                                    

Legend:
Removed from v.840  
changed lines
  Added in v.918

  ViewVC Help
Powered by ViewVC 1.1.20