From ab118ebc46be890f77a1a8d9e2846f2c78004f6f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 19 Jun 2014 11:14:57 +0300 Subject: [PATCH] deleted unused class and little hotfix to xml res file --- OsmAnd/res/menu/route_step_menu.xml | 13 ---- OsmAnd/res/values/strings.xml | 2 +- OsmAnd/src/net/osmand/plus/OsmandPlugin.java | 2 +- .../RoutePointsActivity.java | 4 +- .../RoutePointsLayer.java | 67 ------------------- .../RoutePointsPlugin.java | 15 ----- 6 files changed, 4 insertions(+), 99 deletions(-) delete mode 100644 OsmAnd/res/menu/route_step_menu.xml delete mode 100644 OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsLayer.java diff --git a/OsmAnd/res/menu/route_step_menu.xml b/OsmAnd/res/menu/route_step_menu.xml deleted file mode 100644 index d4fad37613..0000000000 --- a/OsmAnd/res/menu/route_step_menu.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 3e8c0860bf..52f471f70a 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -1877,4 +1877,4 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A Play sound on photo shot Choose whether to play a sound when shooting photos Invalid format: %s - + \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/OsmandPlugin.java b/OsmAnd/src/net/osmand/plus/OsmandPlugin.java index 39ad92679d..d83265fed6 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandPlugin.java +++ b/OsmAnd/src/net/osmand/plus/OsmandPlugin.java @@ -83,7 +83,7 @@ public abstract class OsmandPlugin { installedPlugins.add(parking); } - //RoutePointsPlugin routePointsPlugin = new RoutePointsPlugin(app); + //routePointsPlugin routePointsPlugin = new RoutePointsPlugin(app); //installedPlugins.add(routePointsPlugin); //enablePlugin(app,routePointsPlugin,true); diff --git a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsActivity.java b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsActivity.java index 3f7a45414a..04a7d9b0d9 100644 --- a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsActivity.java +++ b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsActivity.java @@ -382,7 +382,7 @@ public class RoutePointsActivity extends OsmandListActivity { item.setIcon(R.drawable.ic_action_signpost_dark); item = menu.add(getString(R.string.mark_as_visited)); item.setIcon(R.drawable.ic_action_ok_dark); - item = menu.add(getString(R.string.show_on_map)); + item = menu.add(getString(R.string.show_poi_on_map)); item.setIcon(R.drawable.ic_action_map_marker_dark); return true; } @@ -398,7 +398,7 @@ public class RoutePointsActivity extends OsmandListActivity { plugin.setCurrentPoint(sortedPointsList.get(selectedItemIndex)); sortPoints(); displayListView(); - } else if (menuItem.getTitle().equals(getResources().getString(R.string.show_on_map))) { + } else if (menuItem.getTitle().equals(getResources().getString(R.string.show_poi_on_map))) { GPXUtilities.WptPt point = sortedPointsList.get(selectedItemIndex); app.getSettings().setMapLocationToShow(point.lat, point.lon, app.getSettings().getMapZoomToShow()); finish(); diff --git a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsLayer.java b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsLayer.java deleted file mode 100644 index cba5596dbb..0000000000 --- a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsLayer.java +++ /dev/null @@ -1,67 +0,0 @@ -package net.osmand.plus.routepointsnavigation; - -import android.graphics.Canvas; -import android.graphics.PointF; -import net.osmand.data.LatLon; -import net.osmand.data.RotatedTileBox; -import net.osmand.plus.activities.MapActivity; -import net.osmand.plus.views.ContextMenuLayer; -import net.osmand.plus.views.OsmandMapLayer; -import net.osmand.plus.views.OsmandMapTileView; - -import java.util.List; - -/** - * Created by Barsik on 10.06.2014. - */ -public class RoutePointsLayer extends OsmandMapLayer implements ContextMenuLayer.IContextMenuProvider { - - private final MapActivity map; - private RoutePointsPlugin plugin; - - public RoutePointsLayer(MapActivity map, RoutePointsPlugin plugin){ - this.map = map; - this.plugin = plugin; - } - - - @Override - public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List o) { - - } - - @Override - public LatLon getObjectLocation(Object o) { - return null; - } - - @Override - public String getObjectDescription(Object o) { - return null; - } - - @Override - public String getObjectName(Object o) { - return null; - } - - @Override - public void initLayer(OsmandMapTileView view) { - - } - - @Override - public void onDraw(Canvas canvas, RotatedTileBox tileBox, DrawSettings settings) { - - } - - @Override - public void destroyLayer() { - - } - - @Override - public boolean drawInScreenPixels() { - return false; - } -} diff --git a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java index e81cf7723b..0433f51ffc 100644 --- a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java +++ b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java @@ -29,7 +29,6 @@ public class RoutePointsPlugin extends OsmandPlugin { private GPXUtilities.GPXFile gpx; private GPXUtilities.Route currentRoute; private GPXUtilities.WptPt currentPoint; - private RoutePointsLayer routeStepsLayer; private List pointsList; private TextInfoWidget routeStepsControl; @@ -107,16 +106,6 @@ public class RoutePointsPlugin extends OsmandPlugin { getCurrentPoint(); } - public void registerLayers(MapActivity activity) { - // remove old if existing after turn - if (routeStepsLayer != null) { - activity.getMapView().removeLayer(routeStepsLayer); - } - routeStepsLayer = new RoutePointsLayer(activity, this); - activity.getMapView().addLayer(routeStepsLayer, 5.5f); - registerWidget(activity); - } - private void registerWidget(MapActivity activity) { MapInfoLayer mapInfoLayer = activity.getMapLayers().getMapInfoLayer(); if (mapInfoLayer != null) { @@ -149,10 +138,6 @@ public class RoutePointsPlugin extends OsmandPlugin { @Override public void updateLayers(OsmandMapTileView mapView, MapActivity activity) { - if (routeStepsLayer == null) { - registerLayers(activity); - } - if (routeStepsControl == null) { registerWidget(activity); }