예제 #1
0
 @Override
 public void onPrepareOptionsMenu(final Menu menu) {
   showMenuItem(menu, R.id.ic_menu_liveride, Route.available() && hasGps_);
   enableMenuItem(menu, R.id.ic_menu_directions, true);
   showMenuItem(menu, R.id.ic_menu_saved_routes, Route.storedCount() != 0);
   enableMenuItem(menu, R.id.ic_menu_route_number, true);
   super.onPrepareOptionsMenu(menu);
 } // onPrepareOptionsMenu
예제 #2
0
 private void startNewRoute(final DialogInterface.OnClickListener listener) {
   if (Route.available() && CycleStreetsPreferences.confirmNewRoute())
     MessageBox.YesNo(mapView(), R.string.confirm_new_route, listener);
   else listener.onClick(null, 0);
 } // startNewRoute