diff --git a/DataExtractionOSM/src/com/osmand/ToDoConstants.java b/DataExtractionOSM/src/com/osmand/ToDoConstants.java index f109dc72b6..005a8c5329 100644 --- a/DataExtractionOSM/src/com/osmand/ToDoConstants.java +++ b/DataExtractionOSM/src/com/osmand/ToDoConstants.java @@ -16,15 +16,16 @@ public class ToDoConstants { // TODO BUGS Android // ! 3. different screens better support - // 5. add progress saving track from settings - // 6. Add car choose for show only route from point - // 7. Remove speed length arrow - // 8. Give message before 3km & take into account speed (to say faster) - // 9. Check again cancel route! + + // 6. Add car choose for show only route from point (+) + // 8. Check again cancel route (+) + // 7. Remove speed length arrow (+) + // 5. add progress saving track from settings (+) // Improvements // ! Download with wget // ! progress while map is loading + // ! Give voice alert before 3km to the turn & take into account speed (to say faster) // Not clear if it is really needed // 69. Add phone information to POI diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml index 1119ca2ba5..259bfb4fb5 100644 --- a/OsmAnd/res/values-ru/strings.xml +++ b/OsmAnd/res/values-ru/strings.xml @@ -1,5 +1,6 @@ + Показать маршрут Избранные точки успешно импортированы GPX файл, содержащий точки, не был найден в {0} Избранные точки сохранены в {0} @@ -23,7 +24,7 @@ Слои Предыдущий маршрут был не закончен. Продолжить следовать по нему? Искать POI - Маршрут от точки + Маршрут от Использовать трекбол, чтобы перемещать карту Использовать трекбол Выберите время поиска позиции сервиса diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index e45ccb6676..e1e227b4bf 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -1,5 +1,6 @@ + Show route Favorite points were succesfully imported GPX file to load favorite points is not found at {0} Favorite points were succesfully saved to {0} @@ -23,7 +24,7 @@ Layers Previous route was unfinished. Do you want to continue follow with it? Search POI - Show route from + Route from Use trackball to move map Use trackball Choose wait interval determining location diff --git a/OsmAnd/src/com/osmand/activities/MapActivity.java b/OsmAnd/src/com/osmand/activities/MapActivity.java index 37316c2eb1..0c21962ef6 100644 --- a/OsmAnd/src/com/osmand/activities/MapActivity.java +++ b/OsmAnd/src/com/osmand/activities/MapActivity.java @@ -137,8 +137,6 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso private WakeLock wakeLock; private boolean sensorRegistered = false; - private MenuItem navigateToPointMenu; - private MenuItem muteMenu; private NotificationManager mNotificationManager; private Handler mapPositionHandler = null; private int APP_NOTIFICATION_ID; @@ -512,7 +510,6 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso OsmandSettings.setFollowingByRoute(MapActivity.this, false); } navigationLayer.setPointToNavigate(point); - updateNavigateToPointMenu(); } public Location getLastKnownLocation(){ @@ -841,7 +838,16 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso locationLayer.setHeading(val); } - private void updateNavigateToPointMenu(){ + public boolean onCreateOptionsMenu(Menu menu) { + MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.map_menu, menu); + return true; + } + + @Override + public boolean onPrepareOptionsMenu(Menu menu) { + boolean val = super.onPrepareOptionsMenu(menu); + MenuItem navigateToPointMenu = menu.findItem(R.id.map_navigate_to_point); if (navigateToPointMenu != null) { navigateToPointMenu.setTitle(routingHelper.isRouteCalculated() ? R.string.stop_routing : R.string.stop_navigation); if (OsmandSettings.getPointToNavigate(this) != null) { @@ -850,6 +856,7 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso navigateToPointMenu.setVisible(false); } } + MenuItem muteMenu = menu.findItem(R.id.map_mute); if(muteMenu != null){ muteMenu.setTitle(routingHelper.getVoiceRouter().isMute() ? R.string.menu_mute_on : R.string.menu_mute_off); if (routingHelper.getFinalLocation() != null && routingHelper.isFollowingMode()) { @@ -858,15 +865,8 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso muteMenu.setVisible(false); } } - } - - public boolean onCreateOptionsMenu(Menu menu) { - MenuInflater inflater = getMenuInflater(); - inflater.inflate(R.menu.map_menu, menu); - navigateToPointMenu = menu.findItem(R.id.map_navigate_to_point); - muteMenu = menu.findItem(R.id.map_mute); - updateNavigateToPointMenu(); - return true; + + return val; } @Override @@ -895,7 +895,7 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso contextMenuPoint(mapView.getLatitude(), mapView.getLongitude(), true); return true; } else if (item.getItemId() == R.id.map_get_directions) { - getDirections(mapView.getLatitude(), mapView.getLongitude()); + getDirections(mapView.getLatitude(), mapView.getLongitude(), true); return true; } else if (item.getItemId() == R.id.map_layers) { openLayerSelectionDialog(); @@ -905,7 +905,6 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso return true; } else if (item.getItemId() == R.id.map_mute) { routingHelper.getVoiceRouter().setMute(!routingHelper.getVoiceRouter().isMute()); - updateNavigateToPointMenu(); return true; } else if (item.getItemId() == R.id.map_navigate_to_point) { if(navigationLayer.getPointToNavigate() != null){ @@ -913,7 +912,6 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso routingHelper.setFinalAndCurrentLocation(null, null); OsmandSettings.setFollowingByRoute(MapActivity.this, false); routingHelper.setFollowingMode(false); - updateNavigateToPointMenu(); } else { navigateToPoint(null); } @@ -925,13 +923,22 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso return super.onOptionsItemSelected(item); } - protected void getDirections(final double lat, final double lon){ + private ApplicationMode getAppMode(ToggleButton[] buttons){ + for(int i=0; i