fix edit marker icon/text
This commit is contained in:
parent
afd021f916
commit
1dfb03c9b1
1 changed files with 4 additions and 3 deletions
|
@ -43,6 +43,7 @@ import net.osmand.plus.ContextMenuAdapter.ItemClickListener;
|
||||||
import net.osmand.plus.ContextMenuItem;
|
import net.osmand.plus.ContextMenuItem;
|
||||||
import net.osmand.plus.ContextMenuItem.ItemBuilder;
|
import net.osmand.plus.ContextMenuItem.ItemBuilder;
|
||||||
import net.osmand.plus.MapMarkersHelper;
|
import net.osmand.plus.MapMarkersHelper;
|
||||||
|
import net.osmand.plus.MapMarkersHelper.MapMarker;
|
||||||
import net.osmand.plus.OsmAndLocationProvider;
|
import net.osmand.plus.OsmAndLocationProvider;
|
||||||
import net.osmand.plus.OsmandApplication;
|
import net.osmand.plus.OsmandApplication;
|
||||||
import net.osmand.plus.OsmandPlugin;
|
import net.osmand.plus.OsmandPlugin;
|
||||||
|
@ -353,10 +354,10 @@ public class MapActivityActions implements DialogProvider {
|
||||||
.setOrder(10)
|
.setOrder(10)
|
||||||
.createItem());
|
.createItem());
|
||||||
adapter.addItem(itemBuilder
|
adapter.addItem(itemBuilder
|
||||||
.setTitleId(R.string.shared_string_marker, mapActivity)
|
.setTitleId(selectedObj instanceof MapMarker ? R.string.shared_string_edit : R.string.shared_string_marker, mapActivity)
|
||||||
.setId(MAP_CONTEXT_MENU_MARKER_ID)
|
.setId(MAP_CONTEXT_MENU_MARKER_ID)
|
||||||
.setOrder(20)
|
.setOrder(20)
|
||||||
.setIcon(R.drawable.ic_action_flag_stroke)
|
.setIcon(selectedObj instanceof MapMarker ? R.drawable.ic_action_edit_dark : R.drawable.ic_action_flag_stroke)
|
||||||
.createItem());
|
.createItem());
|
||||||
adapter.addItem(itemBuilder
|
adapter.addItem(itemBuilder
|
||||||
.setTitleId(R.string.shared_string_share, mapActivity)
|
.setTitleId(R.string.shared_string_share, mapActivity)
|
||||||
|
@ -478,7 +479,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
getMyApplication().getAvoidSpecificRoads().addImpassableRoad(mapActivity, new LatLon(latitude, longitude), true, false, null);
|
getMyApplication().getAvoidSpecificRoads().addImpassableRoad(mapActivity, new LatLon(latitude, longitude), true, false, null);
|
||||||
} else if (standardId == R.string.shared_string_add || standardId == R.string.favourites_context_menu_edit) {
|
} else if (standardId == R.string.shared_string_add || standardId == R.string.favourites_context_menu_edit) {
|
||||||
mapActivity.getContextMenu().buttonFavoritePressed();
|
mapActivity.getContextMenu().buttonFavoritePressed();
|
||||||
} else if (standardId == R.string.shared_string_marker) {
|
} else if (standardId == R.string.shared_string_marker || standardId == R.string.shared_string_edit) {
|
||||||
mapActivity.getContextMenu().buttonWaypointPressed();
|
mapActivity.getContextMenu().buttonWaypointPressed();
|
||||||
} else if (standardId == R.string.shared_string_share) {
|
} else if (standardId == R.string.shared_string_share) {
|
||||||
mapActivity.getContextMenu().buttonSharePressed();
|
mapActivity.getContextMenu().buttonSharePressed();
|
||||||
|
|
Loading…
Reference in a new issue