diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 1a678afc6d..fb99df2849 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 --> + Marker %s activated. Tap on marker on the map, move it to the first place in active markers, without opening context menu. One tap active Looking for tracks with waypoints diff --git a/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java b/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java index 93f80d5a35..44194aff2a 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapMarkersLayer.java @@ -14,9 +14,11 @@ import android.os.Handler; import android.os.Message; import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import android.support.design.widget.Snackbar; import android.support.v4.content.ContextCompat; import android.view.GestureDetector; import android.view.MotionEvent; +import android.view.View; import net.osmand.Location; import net.osmand.data.LatLon; @@ -487,7 +489,18 @@ public class MapMarkersLayer extends OsmandMapLayer implements IContextMenuProvi || !map.getMyApplication().getSettings().SELECT_MARKER_ON_SINGLE_TAP.get()) { return false; } - map.getMyApplication().getMapMarkersHelper().moveMarkerToTop((MapMarker) o); + final MapMarkersHelper helper = map.getMyApplication().getMapMarkersHelper(); + final MapMarker old = helper.getMapMarkers().get(0); + helper.moveMarkerToTop((MapMarker) o); + String title = map.getString(R.string.marker_activated, helper.getMapMarkers().get(0).getName(map)); + Snackbar.make(map.findViewById(R.id.bottomFragmentContainer), title, Snackbar.LENGTH_LONG) + .setAction(R.string.shared_string_cancel, new View.OnClickListener() { + @Override + public void onClick(View v) { + helper.moveMarkerToTop(old); + } + }) + .show(); return true; }