Example #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
Example #2
0
 public void onRouteNow(int itinerary) {
   Route.FetchRoute(
       CycleStreetsPreferences.routeType(),
       itinerary,
       CycleStreetsPreferences.speed(),
       getActivity());
 } // onRouteNow
Example #3
0
 @Override
 public void onResume() {
   super.onResume();
   Route.registerListener(this);
   Route.onResume();
 } // onResume
Example #4
0
 @Override
 public void onPause() {
   Route.setWaypoints(routeSetter_.waypoints());
   Route.unregisterListener(this);
   super.onPause();
 } // onPause
Example #5
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