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