diff --git a/OsmAnd/res/layout/waypoint_reached.xml b/OsmAnd/res/layout/waypoint_reached.xml
index 50a4772d9e..cb7b9df929 100644
--- a/OsmAnd/res/layout/waypoint_reached.xml
+++ b/OsmAnd/res/layout/waypoint_reached.xml
@@ -99,7 +99,6 @@
android:clickable="false"
android:scaleType="center"
android:src="@drawable/ic_flat_list_dark"
- android:tag="DragIcon"
android:visibility="gone"/>
\ No newline at end of file
diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index 91f80b908c..b2b735f893 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -9,6 +9,7 @@
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
-->
+ Switch start & finish
Item deleted
items deleted
UNDO ALL
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
index fb7dd9f67f..9c19de02c2 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
@@ -86,7 +86,7 @@ public class MapActivityActions implements DialogProvider {
routingHelper = mapActivity.getMyApplication().getRoutingHelper();
}
-
+ /*
public void addAsWaypoint(double latitude, double longitude, PointDescription pd) {
TargetPointsHelper targets = getMyApplication().getTargetPointsHelper();
boolean destination = (targets.getPointToNavigate() == null);
@@ -97,7 +97,8 @@ public class MapActivityActions implements DialogProvider {
openIntermediateEditPointsDialog();
}
-
+ */
+
public void addAsTarget(double latitude, double longitude, PointDescription pd) {
TargetPointsHelper targets = getMyApplication().getTargetPointsHelper();
targets.navigateToPoint(new LatLon(latitude, longitude), true, targets.getIntermediatePoints().size() + 1,
@@ -736,9 +737,11 @@ public class MapActivityActions implements DialogProvider {
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.WAYPOINTS);
}
+ /*
public void openIntermediateEditPointsDialog() {
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.WAYPOINTS_EDIT);
}
+ */
public void openRoutePreferencesDialog() {
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.ROUTE_PREFERENCES);
@@ -758,6 +761,7 @@ public class MapActivityActions implements DialogProvider {
settings.LAST_ROUTING_APPLICATION_MODE = settings.APPLICATION_MODE.get();
settings.APPLICATION_MODE.set(settings.DEFAULT_APPLICATION_MODE.get());
mapActivity.updateApplicationModeSettings();
+ mapActivity.getDashboard().clearDeletedPoints();
}
public AlertDialog stopNavigationActionConfirm() {
diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java
index 0d5a723f89..edace008cf 100644
--- a/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java
+++ b/OsmAnd/src/net/osmand/plus/dashboard/DashWaypointsFragment.java
@@ -96,7 +96,7 @@ public class DashWaypointsFragment extends DashLocationFragment {
View dv = getActivity().getLayoutInflater().inflate(R.layout.divider, null);
favorites.addView(dv);
View v = WaypointDialogHelper.updateWaypointItemView(false, null, getMyApplication(),
- getActivity(), null, ps, null, !getMyApplication().getSettings().isLightContent(), true);
+ getActivity(), null, null, ps, null, !getMyApplication().getSettings().isLightContent(), true);
favorites.addView(v);
}
diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java
index 364efa4192..c1f3373e18 100644
--- a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java
+++ b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java
@@ -54,6 +54,7 @@ import net.osmand.plus.dialogs.ConfigureMapMenu;
import net.osmand.plus.download.DownloadActivity;
import net.osmand.plus.helpers.AndroidUiHelper;
import net.osmand.plus.helpers.WaypointDialogHelper;
+import net.osmand.plus.helpers.WaypointDialogHelper.PointDeleteCallback;
import net.osmand.plus.helpers.WaypointHelper.LocationPointWrapper;
import net.osmand.plus.mapcontextmenu.other.RoutePreferencesMenu;
import net.osmand.plus.mapcontextmenu.other.RoutePreferencesMenu.LocalRoutingParameter;
@@ -79,7 +80,8 @@ import static android.util.TypedValue.COMPLEX_UNIT_DIP;
/**
*/
-public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicListViewCallbacks, IRouteInformationListener {
+public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicListViewCallbacks,
+ IRouteInformationListener, PointDeleteCallback {
private static final org.apache.commons.logging.Log LOG =
PlatformUtil.getLog(DashboardOnMap.class);
private static final String TAG = "DashboardOnMap";
@@ -149,7 +151,6 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
public enum DashboardType {
WAYPOINTS,
WAYPOINTS_FLAT,
- WAYPOINTS_EDIT,
CONFIGURE_SCREEN,
CONFIGURE_MAP,
LIST_MENU,
@@ -178,6 +179,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
public void createDashboardView() {
baseColor = mapActivity.getResources().getColor(R.color.osmand_orange) & 0x00ffffff;
waypointDialogHelper = new WaypointDialogHelper(mapActivity);
+ waypointDialogHelper.setPointDeleteCallback(this);
landscape = !AndroidUiHelper.isOrientationPortrait(mapActivity);
dashboardView = (FrameLayout) mapActivity.findViewById(R.id.dashboard);
final View.OnClickListener listener = new View.OnClickListener() {
@@ -202,7 +204,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
@Override
public boolean canDismiss(int position) {
boolean res = false;
- if (listAdapter instanceof StableArrayAdapter) {
+ if (visibleType == DashboardType.WAYPOINTS && listAdapter instanceof StableArrayAdapter) {
List