--- android/TrainInfo/src/dk/thoerup/traininfo/StationList.java 2009/10/02 10:39:09 381 +++ android/TrainInfo/src/dk/thoerup/traininfo/StationList.java 2009/10/08 11:50:46 420 @@ -104,10 +104,19 @@ @Override public boolean onCreateOptionsMenu(Menu menu) { - menu.add(0, OPTIONS_RESCAN, 0, "Find nearest stations"); - menu.add(0, OPTIONS_NAMESEARCH, 0, "Search for station"); - menu.add(0, OPTIONS_MAP, 0, "Show station map"); - menu.add(0, OPTIONS_ABOUT, 0, "About"); + MenuItem item; + + item = menu.add(0, OPTIONS_RESCAN, 0, "Find nearest stations"); + item.setIcon(android.R.drawable.ic_menu_mylocation); + + item = menu.add(0, OPTIONS_NAMESEARCH, 0, "Search for station"); + item.setIcon(android.R.drawable.ic_menu_search); + + item = menu.add(0, OPTIONS_MAP, 0, "Show station map"); + item.setIcon(android.R.drawable.ic_menu_mapmode); + + item = menu.add(0, OPTIONS_ABOUT, 0, "About"); + item.setIcon(android.R.drawable.ic_menu_info_details); return true; } @@ -140,9 +149,14 @@ case OPTIONS_ABOUT: String ver = this.getResources().getString(R.string.app_version); + Location loc = locator.getLocation(); StringBuffer message = new StringBuffer(); message.append("TrainInfo DK v").append(ver).append("\n"); message.append("By Torben Nielsen\n"); + message.append("\n"); + message.append("Location info:\n"); + message.append("-Obtained by: ").append(loc != null ? loc.getProvider() : "-").append("\n"); + message.append("-Accuracy: ").append(loc != null ? (int)loc.getAccuracy() : "-").append("m\n"); MessageBox.showMessage(this, message.toString()); break; @@ -178,7 +192,7 @@ if (et.getText().toString().length() >= 2) { startNameSearch(et.getText().toString()); } else { - MessageBox.showMessage(StationList.this, "To characters, minimum" ); + MessageBox.showMessage(StationList.this, "Two characters minimum" ); } } }); @@ -322,7 +336,7 @@ dismissDialog(DLG_PROGRESS); AlertDialog.Builder builder = new AlertDialog.Builder(StationList.this); - builder.setMessage("GPS fix timed out"); + builder.setMessage("Location fix timed out"); builder.setCancelable(true); builder.setPositiveButton("Retry", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) {