/[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 1408 by torben, Mon May 2 11:54:17 2011 UTC revision 1432 by torben, Tue May 3 12:35:34 2011 UTC
# Line 364  public class DepartureList extends ListA Line 364  public class DepartureList extends ListA
364                  boolean res;                  boolean res;
365                  switch(item.getItemId()) {                  switch(item.getItemId()) {
366                  case MENU_MAP:                  case MENU_MAP:
367                          Uri uri = Uri.parse("geo:" + station.getLatitude() + "," + station.getLongitude() + "?z=16");                          try {
368                          startActivity( new Intent(Intent.ACTION_VIEW, uri));                                  Uri uri = Uri.parse("geo:" + station.getLatitude() + "," + station.getLongitude() + "?z=16");
369                                    startActivity( new Intent(Intent.ACTION_VIEW, uri));
370                            } catch (ActivityNotFoundException anfe) {
371                                     Toast.makeText(this, "Could not launch google maps", Toast.LENGTH_LONG).show();
372                            }
373                          res = true;                          res = true;
374                          break;                          break;
375                  case MENU_NOTIFICATIONS:                  case MENU_NOTIFICATIONS:
# Line 429  public class DepartureList extends ListA Line 433  public class DepartureList extends ListA
433                                                    
434                                                    
435                          pgDialog.dismiss();                          pgDialog.dismiss();
436                          //TODO: differentiate whether it was a communication error with my backend  
                         //or that the backend failed because bane.dk was unavailable  
437                          if (departures != null && departures.errorCode == null) {                          if (departures != null && departures.errorCode == null) {
438                                  commFailCounter = 0;                                  commFailCounter = 0;
439                                  DepartureList.this.getListView().setVisibility(View.GONE); //Experimental, inspired by http://osdir.com/ml/Android-Developers/2010-04/msg01198.html                                  DepartureList.this.getListView().setVisibility(View.GONE); //Experimental, inspired by http://osdir.com/ml/Android-Developers/2010-04/msg01198.html

Legend:
Removed from v.1408  
changed lines
  Added in v.1432

  ViewVC Help
Powered by ViewVC 1.1.20