use of net.osmand.plus.mapcontextmenu.other.MapMultiSelectionMenu in project Osmand by osmandapp.
the class MapContextMenu method setMapActivity.
public void setMapActivity(MapActivity mapActivity) {
this.mapActivity = mapActivity;
settings = mapActivity.getMyApplication().getSettings();
if (!appModeListenerAdded) {
mapActivity.getMyApplication().getSettings().APPLICATION_MODE.addListener(this);
appModeListenerAdded = true;
}
if (mapMultiSelectionMenu == null) {
mapMultiSelectionMenu = new MapMultiSelectionMenu(mapActivity);
} else {
mapMultiSelectionMenu.setMapActivity(mapActivity);
}
if (favoritePointEditor != null) {
favoritePointEditor.setMapActivity(mapActivity);
}
if (wptPtEditor != null) {
wptPtEditor.setMapActivity(mapActivity);
}
if (rtePtEditor != null) {
rtePtEditor.setMapActivity(mapActivity);
}
if (active) {
acquireMenuController(false);
if (menuController != null) {
menuController.addPlainMenuItems(typeStr, this.pointDescription, this.latLon);
}
if (searchDoneAction != null && searchDoneAction.dlg != null && searchDoneAction.dlg.getOwnerActivity() != mapActivity) {
searchDoneAction.dlg = buildSearchActionDialog();
searchDoneAction.dlg.show();
}
} else {
menuController = null;
}
}
use of net.osmand.plus.mapcontextmenu.other.MapMultiSelectionMenu in project Osmand by osmandapp.
the class DownloadedRegionsLayer method collectObjectsFromPoint.
// IContextMenuProvider
@Override
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> objects, boolean unknownLocation) {
boolean isMenuVisible = false;
if (view.getContext() instanceof MapActivity) {
MapActivity mapActivity = (MapActivity) view.getContext();
MapContextMenu menu = mapActivity.getContextMenu();
MapMultiSelectionMenu multiMenu = menu.getMultiSelectionMenu();
isMenuVisible = menu.isVisible() || multiMenu.isVisible();
}
if (!isMenuVisible) {
getWorldRegionFromPoint(tileBox, point, objects);
}
}
Aggregations