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

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

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

revision 843 by torben, Sun Jun 13 13:45:37 2010 UTC revision 918 by torben, Sat Jun 26 11:02:53 2010 UTC
# Line 135  public class DepartureList extends ListA Line 135  public class DepartureList extends ListA
135                    
136          outState.putSerializable("departures", (ArrayList<DepartureBean>) departures);          outState.putSerializable("departures", (ArrayList<DepartureBean>) departures);
137      }      }
138        
139        
140                    
141          @Override          @Override
142            protected void onDestroy() {
143                    super.onDestroy();
144                    
145                    if (fetcher != null) {
146                            fetcher.cancel(true);
147                    }
148            }
149    
150            @Override
151          protected void onListItemClick(ListView l, View v, int position, long id) {          protected void onListItemClick(ListView l, View v, int position, long id) {
152                  super.onListItemClick(l, v, position, id);                  super.onListItemClick(l, v, position, id);
153                                    
# Line 220  public class DepartureList extends ListA Line 231  public class DepartureList extends ListA
231                          pgDialog.dismiss();                          pgDialog.dismiss();
232                                                    
233                          if (success) {                          if (success) {
234                                    DepartureList.this.getListView().setVisibility(View.GONE); //Experimental, inspired by http://osdir.com/ml/Android-Developers/2010-04/msg01198.html
235                                  adapter.setDepartures(departures);                                  adapter.setDepartures(departures);
236                                    DepartureList.this.getListView().setVisibility(View.VISIBLE);
237                                    
238                                  if (departures.size() == 0) {                                  if (departures.size() == 0) {
239                                          MessageBox.showMessage(DepartureList.this, "No departures found");                                          MessageBox.showMessage(DepartureList.this, "No departures found", true);
240                                  }                                  }
241                          } else { // communication or parse error                          } else { // communication or parse error
242                                  AlertDialog.Builder builder = new AlertDialog.Builder(DepartureList.this);                                                                                AlertDialog.Builder builder = new AlertDialog.Builder(DepartureList.this);                                              

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

  ViewVC Help
Powered by ViewVC 1.1.20