This commit is contained in:
sergdevosm 2020-08-24 00:44:46 +03:00
parent 7907e72781
commit e2b8e77c1c
6 changed files with 8 additions and 8 deletions

View file

@ -525,7 +525,7 @@ public abstract class OsmandPlugin {
protected void registerLayerContextMenuActions(OsmandMapTileView mapView, ContextMenuAdapter adapter, MapActivity mapActivity) {
}
protected void registerMapContextMenuActions(MapActivity mapActivity, double latitude, double longitude, ContextMenuAdapter adapter, Object selectedObj) {
protected void registerMapContextMenuActions(MapActivity mapActivity, double latitude, double longitude, ContextMenuAdapter adapter, Object selectedObj, boolean configureMenu) {
}
protected void registerOptionsMenuItems(MapActivity mapActivity, ContextMenuAdapter helper) {
@ -791,9 +791,9 @@ public abstract class OsmandPlugin {
}
}
public static void registerMapContextMenu(MapActivity map, double latitude, double longitude, ContextMenuAdapter adapter, Object selectedObj) {
public static void registerMapContextMenu(MapActivity map, double latitude, double longitude, ContextMenuAdapter adapter, Object selectedObj, boolean configureMenu) {
for (OsmandPlugin plugin : getEnabledPlugins()) {
plugin.registerMapContextMenuActions(map, latitude, longitude, adapter, selectedObj);
plugin.registerMapContextMenuActions(map, latitude, longitude, adapter, selectedObj, configureMenu);
}
}

View file

@ -384,7 +384,7 @@ public class MapActivityActions implements DialogProvider {
.setOrder(SEARCH_NEAR_ITEM_ORDER)
.createItem());
OsmandPlugin.registerMapContextMenu(mapActivity, latitude, longitude, adapter, selectedObj);
OsmandPlugin.registerMapContextMenu(mapActivity, latitude, longitude, adapter, selectedObj, configureMenu);
ItemClickListener listener = new ItemClickListener() {
@Override

View file

@ -659,7 +659,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
@Override
public void registerMapContextMenuActions(final MapActivity mapActivity, final double latitude, final double longitude,
ContextMenuAdapter adapter, Object selectedObj) {
ContextMenuAdapter adapter, Object selectedObj, boolean configureMenu) {
if (isRecording()) {
return;
}

View file

@ -219,7 +219,7 @@ public class OsmEditingPlugin extends OsmandPlugin {
final double latitude,
final double longitude,
ContextMenuAdapter adapter,
final Object selectedObj) {
final Object selectedObj, boolean configureMenu) {
ContextMenuAdapter.ItemClickListener listener = new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int resId, int pos, boolean isChecked, int[] viewCoordinates) {

View file

@ -230,7 +230,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
@Override
public void registerMapContextMenuActions(final MapActivity mapActivity,
final double latitude, final double longitude,
ContextMenuAdapter adapter, Object selectedObj) {
ContextMenuAdapter adapter, Object selectedObj, boolean configureMenu) {
ItemClickListener addListener = new ItemClickListener() {
@Override

View file

@ -400,7 +400,7 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
@Override
public void registerMapContextMenuActions(MapActivity mapActivity,
final double latitude, final double longitude,
ContextMenuAdapter adapter, Object selectedObj) {
ContextMenuAdapter adapter, Object selectedObj, boolean configureMenu) {
final WeakReference<MapActivity> mapActivityRef = new WeakReference<>(mapActivity);
if (mapActivity.getMapView().getMainLayer() instanceof MapTileLayer) {
ItemClickListener listener = new ContextMenuAdapter.ItemClickListener() {