diff --git a/OsmAnd/AndroidManifest.xml b/OsmAnd/AndroidManifest.xml
index c0aa8be30f..49648a97e7 100644
--- a/OsmAnd/AndroidManifest.xml
+++ b/OsmAnd/AndroidManifest.xml
@@ -166,6 +166,7 @@
+
diff --git a/OsmAnd/res/layout/waypoint_header.xml b/OsmAnd/res/layout/waypoint_header.xml
index 40ff101a1a..76b9e2431c 100644
--- a/OsmAnd/res/layout/waypoint_header.xml
+++ b/OsmAnd/res/layout/waypoint_header.xml
@@ -32,4 +32,15 @@
+
+
\ No newline at end of file
diff --git a/OsmAnd/src/net/osmand/plus/OsmAndAppCustomization.java b/OsmAnd/src/net/osmand/plus/OsmAndAppCustomization.java
index 4caab396c7..1044dc3449 100644
--- a/OsmAnd/src/net/osmand/plus/OsmAndAppCustomization.java
+++ b/OsmAnd/src/net/osmand/plus/OsmAndAppCustomization.java
@@ -9,6 +9,7 @@ import net.osmand.IProgress;
import net.osmand.IndexConstants;
import net.osmand.data.LocationPoint;
import net.osmand.plus.activities.MapActivity;
+import net.osmand.plus.activities.MapMarkersActivity;
import net.osmand.plus.activities.PluginsActivity;
import net.osmand.plus.activities.SettingsActivity;
import net.osmand.plus.activities.TrackActivity;
@@ -67,7 +68,10 @@ public class OsmAndAppCustomization {
return FavoritesActivity.class;
}
-
+ public Class getMapMarkersActivity(){
+ return MapMarkersActivity.class;
+ }
+
public Class extends Activity> getDownloadIndexActivity() {
return DownloadActivity.class;
}
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
index 66b5921e26..f26d933829 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
@@ -564,12 +564,15 @@ public class MapActivityActions implements DialogProvider {
return true;
}
}).reg();
- optionsMenuHelper.item(R.string.waypoints).iconColor(R.drawable.ic_action_waypoint)
+ optionsMenuHelper.item(R.string.map_markers).iconColor(R.drawable.ic_action_waypoint)
.listen(new OnContextMenuClick() {
@Override
public boolean onContextMenuClick(ArrayAdapter> adapter, int itemId, int pos, boolean isChecked) {
- mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.WAYPOINTS);
- return false;
+ Intent newIntent = new Intent(mapActivity, mapActivity.getMyApplication().getAppCustomization()
+ .getMapMarkersActivity());
+ newIntent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
+ mapActivity.startActivity(newIntent);
+ return true;
}
}).reg();
optionsMenuHelper.item(R.string.get_directions).iconColor(R.drawable.ic_action_gdirections_dark)
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapMarkersActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapMarkersActivity.java
index 605990e7e1..d6c0d53e2a 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapMarkersActivity.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapMarkersActivity.java
@@ -1,21 +1,30 @@
package net.osmand.plus.activities;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.ShapeDrawable;
+import android.graphics.drawable.shapes.Shape;
import android.os.Bundle;
-import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
-import android.widget.ArrayAdapter;
-import android.widget.CompoundButton;
+import android.widget.Button;
+import android.widget.ImageView;
import android.widget.TextView;
import net.osmand.AndroidUtils;
+import net.osmand.data.LatLon;
+import net.osmand.data.PointDescription;
import net.osmand.plus.GeocodingLookupService;
+import net.osmand.plus.IconsCache;
import net.osmand.plus.MapMarkersHelper;
import net.osmand.plus.MapMarkersHelper.MapMarker;
+import net.osmand.plus.OsmAndFormatter;
+import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
-import net.osmand.plus.helpers.WaypointHelper;
+import net.osmand.plus.views.controls.ListDividerShape;
import net.osmand.plus.views.controls.StableArrayAdapter;
+import net.osmand.util.Algorithms;
+import net.osmand.util.MapUtils;
import java.util.ArrayList;
import java.util.List;
@@ -34,7 +43,8 @@ public class MapMarkersActivity extends OsmandListActivity {
setContentView(R.layout.map_markers);
getSupportActionBar().setTitle(R.string.map_markers);
- nightMode = getMyApplication().getDaynightHelper().isNightModeForMapControls();
+ //nightMode = getMyApplication().getDaynightHelper().isNightModeForMapControls();
+ nightMode = !getMyApplication().getSettings().isLightContent();
setListAdapter(getMapMarkersListAdapter());
}
@@ -65,29 +75,27 @@ public class MapMarkersActivity extends OsmandListActivity {
@Override
public void buildDividers() {
- dividers = getCustomDividers(ctx, getObjects(), nightMode);
+ dividers = getCustomDividers(getObjects());
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
// User super class to create the View
View v = convertView;
- final ArrayAdapter