/[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 382 by torben, Fri Oct 2 10:49:00 2009 UTC revision 420 by torben, Thu Oct 8 11:50:46 2009 UTC
# Line 104  public class StationList extends ListAct Line 104  public class StationList extends ListAct
104    
105          @Override          @Override
106          public boolean onCreateOptionsMenu(Menu menu) {          public boolean onCreateOptionsMenu(Menu menu) {
107                  menu.add(0, OPTIONS_RESCAN, 0, "Find nearest stations");                  MenuItem item;
108                  menu.add(0, OPTIONS_NAMESEARCH, 0, "Search for station");                  
109                  menu.add(0, OPTIONS_MAP, 0, "Show station map");                  item = menu.add(0, OPTIONS_RESCAN, 0, "Find nearest stations");
110                  menu.add(0, OPTIONS_ABOUT, 0, "About");                  item.setIcon(android.R.drawable.ic_menu_mylocation);
111                    
112                    item = menu.add(0, OPTIONS_NAMESEARCH, 0, "Search for station");
113                    item.setIcon(android.R.drawable.ic_menu_search);
114                    
115                    item = menu.add(0, OPTIONS_MAP, 0, "Show station map");
116                    item.setIcon(android.R.drawable.ic_menu_mapmode);
117                    
118                    item = menu.add(0, OPTIONS_ABOUT, 0, "About");
119                    item.setIcon(android.R.drawable.ic_menu_info_details);
120                  return true;                  return true;
121          }          }
122    
# Line 140  public class StationList extends ListAct Line 149  public class StationList extends ListAct
149                  case OPTIONS_ABOUT:                  case OPTIONS_ABOUT:
150                          String ver = this.getResources().getString(R.string.app_version);                          String ver = this.getResources().getString(R.string.app_version);
151                                                    
152                            Location loc = locator.getLocation();
153                          StringBuffer message = new StringBuffer();                          StringBuffer message = new StringBuffer();
154                          message.append("TrainInfo DK v").append(ver).append("\n");                          message.append("TrainInfo DK v").append(ver).append("\n");
155                          message.append("By Torben Nielsen\n");                          message.append("By Torben Nielsen\n");
156                            message.append("\n");
157                            message.append("Location info:\n");
158                            message.append("-Obtained by: ").append(loc != null ? loc.getProvider() : "-").append("\n");
159                            message.append("-Accuracy: ").append(loc != null ? (int)loc.getAccuracy() : "-").append("m\n");
160    
161                          MessageBox.showMessage(this, message.toString());                          MessageBox.showMessage(this, message.toString());
162                          break;                          break;
# Line 322  public class StationList extends ListAct Line 336  public class StationList extends ListAct
336                                                  dismissDialog(DLG_PROGRESS);                                                  dismissDialog(DLG_PROGRESS);
337                                                                                                    
338                                                  AlertDialog.Builder builder = new AlertDialog.Builder(StationList.this);                                                                                                  AlertDialog.Builder builder = new AlertDialog.Builder(StationList.this);                                                
339                                                  builder.setMessage("GPS fix timed out");                                                  builder.setMessage("Location fix timed out");
340                                                  builder.setCancelable(true);                                                  builder.setCancelable(true);
341                                                  builder.setPositiveButton("Retry", new DialogInterface.OnClickListener() {                                                  builder.setPositiveButton("Retry", new DialogInterface.OnClickListener() {
342                                                          public void onClick(DialogInterface dialog, int id) {                                                          public void onClick(DialogInterface dialog, int id) {

Legend:
Removed from v.382  
changed lines
  Added in v.420

  ViewVC Help
Powered by ViewVC 1.1.20