Open track menu on short click
This commit is contained in:
parent
387de3925f
commit
2838e408a9
1 changed files with 12 additions and 3 deletions
|
@ -44,10 +44,10 @@ import net.osmand.plus.R;
|
||||||
import net.osmand.plus.UiUtilities;
|
import net.osmand.plus.UiUtilities;
|
||||||
import net.osmand.plus.activities.MapActivity;
|
import net.osmand.plus.activities.MapActivity;
|
||||||
import net.osmand.plus.base.PointImageDrawable;
|
import net.osmand.plus.base.PointImageDrawable;
|
||||||
|
import net.osmand.plus.itinerary.ItineraryGroup;
|
||||||
import net.osmand.plus.mapcontextmenu.controllers.SelectedGpxMenuController.SelectedGpxPoint;
|
import net.osmand.plus.mapcontextmenu.controllers.SelectedGpxMenuController.SelectedGpxPoint;
|
||||||
import net.osmand.plus.mapcontextmenu.other.TrackChartPoints;
|
import net.osmand.plus.mapcontextmenu.other.TrackChartPoints;
|
||||||
import net.osmand.plus.mapmarkers.MapMarker;
|
import net.osmand.plus.mapmarkers.MapMarker;
|
||||||
import net.osmand.plus.itinerary.ItineraryGroup;
|
|
||||||
import net.osmand.plus.mapmarkers.MapMarkersHelper;
|
import net.osmand.plus.mapmarkers.MapMarkersHelper;
|
||||||
import net.osmand.plus.render.OsmandRenderer;
|
import net.osmand.plus.render.OsmandRenderer;
|
||||||
import net.osmand.plus.render.OsmandRenderer.RenderingContext;
|
import net.osmand.plus.render.OsmandRenderer.RenderingContext;
|
||||||
|
@ -56,6 +56,7 @@ import net.osmand.plus.settings.backend.CommonPreference;
|
||||||
import net.osmand.plus.track.GradientScaleType;
|
import net.osmand.plus.track.GradientScaleType;
|
||||||
import net.osmand.plus.track.SaveGpxAsyncTask;
|
import net.osmand.plus.track.SaveGpxAsyncTask;
|
||||||
import net.osmand.plus.track.TrackDrawInfo;
|
import net.osmand.plus.track.TrackDrawInfo;
|
||||||
|
import net.osmand.plus.track.TrackMenuFragment;
|
||||||
import net.osmand.plus.views.OsmandMapLayer;
|
import net.osmand.plus.views.OsmandMapLayer;
|
||||||
import net.osmand.plus.views.OsmandMapTileView;
|
import net.osmand.plus.views.OsmandMapTileView;
|
||||||
import net.osmand.plus.views.Renderable;
|
import net.osmand.plus.views.Renderable;
|
||||||
|
@ -1098,9 +1099,17 @@ public class GPXLayer extends OsmandMapLayer implements IContextMenuProvider, IM
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
|
public boolean runExclusiveAction(Object object, boolean unknownLocation) {
|
||||||
|
if (unknownLocation || !(object instanceof SelectedGpxPoint)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
MapActivity mapActivity = (MapActivity) view.getContext();
|
||||||
|
SelectedGpxPoint point = (SelectedGpxPoint) object;
|
||||||
|
WptPt wptPt = point.getSelectedPoint();
|
||||||
|
TrackMenuFragment.showInstance(mapActivity, point.getSelectedGpxFile(),
|
||||||
|
new LatLon(wptPt.lat, wptPt.lon), null, null);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> res, boolean unknownLocation) {
|
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> res, boolean unknownLocation) {
|
||||||
|
|
Loading…
Reference in a new issue