From 9966afebf0afe5414bac59165141303ce2cb78e8 Mon Sep 17 00:00:00 2001 From: sonora Date: Wed, 12 Jun 2013 12:27:53 +0200 Subject: [PATCH] finish documentation for Issue 1929 UI flow --- .../plus/activities/MapActivityActions.java | 20 +++++++++---------- .../activities/NavigatePointFragment.java | 1 + .../search/SearchAddressFragment.java | 1 + 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index dae83b73a3..d4b880d6c2 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -801,15 +801,15 @@ public class MapActivityActions implements DialogProvider { getDirections(loc, null, true); } } else if (standardId == R.string.context_menu_item_intermediate_point) { - // Issue 1929: - navigatePointDialogAndLaunchMap(activity, latitude, longitude, null); - //targets.navigateToPoint(new LatLon(latitude, longitude), true, targets.getIntermediatePoints().size()); + // TODO Issue 1929: insert navigatePointDialog, but without Directions + //navigatePointDialogAndLaunchMap(activity, latitude, longitude, null); + targets.navigateToPoint(new LatLon(latitude, longitude), true, targets.getIntermediatePoints().size()); IntermediatePointsDialog.openIntermediatePointsDialog(mapActivity); // For button-less search UI } else if (standardId == R.string.context_menu_item_destination_point) { - // Issue 1929: - navigatePointDialogAndLaunchMap(activity, latitude, longitude, null); - //targets.navigateToPoint(new LatLon(latitude, longitude), true, -1); + // TODO Issue 1929: insert navigatePointDialog, but without Directions + //navigatePointDialogAndLaunchMap(activity, latitude, longitude, null); + targets.navigateToPoint(new LatLon(latitude, longitude), true, -1); IntermediatePointsDialog.openIntermediatePointsDialog(mapActivity); } else if (standardId == R.string.context_menu_item_share_location) { shareLocation(latitude, longitude, mapActivity.getMapView().getZoom()); @@ -1309,16 +1309,16 @@ public class MapActivityActions implements DialogProvider { settings.insertIntermediatePoint(lat, lon, name, 0, true); } targetPointsHelper.updatePointsFromSettings(); - // Issue 1929: - //MapActivity.launchMapActivityMoveToTop(act); + // TODO Issue 1929: slash next line (no Directions here) + MapActivity.launchMapActivityMoveToTop(act); } }); builder.show(); } else { settings.setPointToNavigate(lat, lon, true, name); targetPointsHelper.updatePointsFromSettings(); - // Issue 1929: - //MapActivity.launchMapActivityMoveToTop(act); + // TODO Issue 1929: slash next line (no Directions here) + MapActivity.launchMapActivityMoveToTop(act); } } diff --git a/OsmAnd/src/net/osmand/plus/activities/NavigatePointFragment.java b/OsmAnd/src/net/osmand/plus/activities/NavigatePointFragment.java index 6b05444cc0..e8f4774bf0 100644 --- a/OsmAnd/src/net/osmand/plus/activities/NavigatePointFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/NavigatePointFragment.java @@ -260,6 +260,7 @@ public class NavigatePointFragment extends SherlockFragment implements SearchAct MapActivity.launchMapActivityMoveToTop(getActivity()); } else if (mode == ADD_WAYPOINT) { MapActivityActions.navigatePointDialogAndLaunchMap(getActivity(), lat, lon, getString(R.string.point_on_map, lat, lon)); + // TODO Issue 1929: show IntermediatePointsDialog now } else if (mode == SHOW_ON_MAP){ OsmandApplication app = (OsmandApplication) getActivity().getApplication(); app.getSettings().setMapLocationToShow(lat, lon, Math.max(12, app.getSettings().getLastKnownMapZoom()), diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java index 6c72225af5..639d812321 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchAddressFragment.java @@ -297,6 +297,7 @@ public class SearchAddressFragment extends SherlockFragment { MapActivity.launchMapActivityMoveToTop(getActivity()); } else if (mode == ADD_WAYPOINT) { MapActivityActions.navigatePointDialogAndLaunchMap(getActivity(), searchPoint.getLatitude(), searchPoint.getLongitude(), historyName); + // TODO Issue 1929: show IntermediatePointsDialog now } else if (mode == SHOW_ON_MAP) { osmandSettings.setMapLocationToShow(searchPoint.getLatitude(), searchPoint.getLongitude(), zoom, historyName); MapActivity.launchMapActivityMoveToTop(getActivity());