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

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

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

revision 1206 by torben, Wed Oct 6 10:42:51 2010 UTC revision 1207 by torben, Sat Dec 25 20:51:29 2010 UTC
# Line 149  public class StationList extends ListAct Line 149  public class StationList extends ListAct
149                                                    
150                          switch (listType) {                          switch (listType) {
151                          case ListNearest:                          case ListNearest:
152                                  startLookup();                                  startNearestLookup();
153                                  break;                                  break;
154                          case ListSearch:                                                          case ListSearch:                                
155                                  showDialog(DLG_STATIONNAME);                                  showDialog(DLG_STATIONNAME);
# Line 324  public class StationList extends ListAct Line 324  public class StationList extends ListAct
324                                          dialog.dismiss();                                          dialog.dismiss();
325                                          String search = et.getText().toString().trim();                                          String search = et.getText().toString().trim();
326                                          if (search.length() >= 2) {                                          if (search.length() >= 2) {
327                                                  startNameSearch(search);                                                  startNameLookup(search);
328                                          } else {                                          } else {
329                                                  showMessageAndClose( getString(stationlist_twocharmin) );                                                  showMessageAndClose( getString(stationlist_twocharmin) );
330                                          }                                          }
# Line 380  public class StationList extends ListAct Line 380  public class StationList extends ListAct
380          /////////////////////////////////////////////////////////////          /////////////////////////////////////////////////////////////
381          //          //
382    
383          public void startLookup() {          public void startNearestLookup() {
384                  dialogMessage = getString( stationlist_waitforlocation );                  dialogMessage = getString( stationlist_waitforlocation );
385                  showDialog(DLG_PROGRESS);                  showDialog(DLG_PROGRESS);
386                                    
# Line 388  public class StationList extends ListAct Line 388  public class StationList extends ListAct
388                  stationsFetched.sendEmptyMessageDelayed(0, 500);                  stationsFetched.sendEmptyMessageDelayed(0, 500);
389          }          }
390                    
391          void startNameSearch(String name) {          void startNameLookup(String name) {
392                  dialogMessage = getString( stationlist_findbyname );                  dialogMessage = getString( stationlist_findbyname );
393                  showDialog(DLG_PROGRESS);                  showDialog(DLG_PROGRESS);
394    
# Line 466  public class StationList extends ListAct Line 466  public class StationList extends ListAct
466                                          builder.setPositiveButton(getString(generic_retry), new DialogInterface.OnClickListener() {                                          builder.setPositiveButton(getString(generic_retry), new DialogInterface.OnClickListener() {
467                                                  public void onClick(DialogInterface dialog, int id) {                                                  public void onClick(DialogInterface dialog, int id) {
468                                                          dialog.dismiss();                                                          dialog.dismiss();
469                                                          startLookup();                                                          startNearestLookup();
470    
471                                                  }                                                  }
472                                          });                                          });
# Line 584  public class StationList extends ListAct Line 584  public class StationList extends ListAct
584                                                          runner = new Runnable() {                                                          runner = new Runnable() {
585                                                                  @Override                                                                  @Override
586                                                                  public void run() {                                                                  public void run() {
587                                                                          startNameSearch( FindStationsTask.this.name );                                                                          startNameLookup( FindStationsTask.this.name );
588                                                                  }                                                                  }
589                                                          };                                                          };
590                                                          break;                                                          break;

Legend:
Removed from v.1206  
changed lines
  Added in v.1207

  ViewVC Help
Powered by ViewVC 1.1.20