Combine ids to make context menu appearance persistent
This commit is contained in:
parent
3b37d0b272
commit
9f31490793
2 changed files with 4 additions and 5 deletions
|
@ -400,7 +400,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
|
||||
ContextMenuItem editGpxItem = new ItemBuilder()
|
||||
.setTitleId(R.string.context_menu_item_edit_waypoint, mapActivity)
|
||||
.setId(MAP_CONTEXT_MENU_EDIT_GPX_WP)
|
||||
.setId(MAP_CONTEXT_MENU_ADD_GPX_WAYPOINT)
|
||||
.setIcon(R.drawable.ic_action_edit_dark)
|
||||
.setOrder(EDIT_GPX_WAYPOINT_ITEM_ORDER)
|
||||
.setListener(listener).createItem();
|
||||
|
@ -412,7 +412,6 @@ public class MapActivityActions implements DialogProvider {
|
|||
.setListener(listener).createItem();
|
||||
|
||||
if (all) {
|
||||
adapter.addItem(editGpxItem);
|
||||
adapter.addItem(addGpxItem);
|
||||
} else if (selectedObj instanceof WptPt
|
||||
&& getMyApplication().getSelectedGpxHelper().getSelectedGPXFile((WptPt) selectedObj) != null) {
|
||||
|
|
|
@ -265,14 +265,14 @@ public class OsmEditingPlugin extends OsmandPlugin {
|
|||
}
|
||||
if (isEditable) {
|
||||
adapter.addItem(new ContextMenuItem.ItemBuilder().setTitleId(R.string.poi_context_menu_modify, mapActivity)
|
||||
.setId(MAP_CONTEXT_MENU_MODIFY_POI)
|
||||
.setId(MAP_CONTEXT_MENU_CREATE_POI)
|
||||
.setIcon(R.drawable.ic_action_edit_dark)
|
||||
.setOrder(MODIFY_POI_ITEM_ORDER)
|
||||
.setListener(listener)
|
||||
.createItem());
|
||||
} else if (selectedObj instanceof OpenstreetmapPoint && ((OpenstreetmapPoint) selectedObj).getAction() != Action.DELETE) {
|
||||
adapter.addItem(new ContextMenuItem.ItemBuilder().setTitleId(R.string.poi_context_menu_modify_osm_change, mapActivity)
|
||||
.setId(MAP_CONTEXT_MENU_MODIFY_OSM_CHANGE)
|
||||
.setId(MAP_CONTEXT_MENU_CREATE_POI)
|
||||
.setIcon(R.drawable.ic_action_edit_dark)
|
||||
.setOrder(MODIFY_OSM_CHANGE_ITEM_ORDER)
|
||||
.setListener(listener)
|
||||
|
@ -287,7 +287,7 @@ public class OsmEditingPlugin extends OsmandPlugin {
|
|||
}
|
||||
if (selectedObj instanceof OsmNotesPoint) {
|
||||
adapter.addItem(new ContextMenuItem.ItemBuilder().setTitleId(R.string.context_menu_item_modify_note, mapActivity)
|
||||
.setId(MAP_CONTEXT_MENU_MODIFY_OSM_NOTE)
|
||||
.setId(MAP_CONTEXT_MENU_OPEN_OSM_NOTE)
|
||||
.setIcon(R.drawable.ic_action_edit_dark)
|
||||
.setOrder(MODIFY_OSM_NOTE_ITEM_ORDER)
|
||||
.setListener(listener)
|
||||
|
|
Loading…
Reference in a new issue