From 285a34f1ca41e67cd3ce5ad10cb41086b971f1bc Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Wed, 18 Nov 2015 18:09:51 +0300 Subject: [PATCH 1/2] Fix star, flag icons in context menu --- .../plus/mapcontextmenu/MapContextMenuFragment.java | 9 +-------- .../net/osmand/plus/mapcontextmenu/MenuController.java | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java index 470ed6b338..a7eae34304 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java @@ -36,7 +36,6 @@ import net.osmand.plus.IconsCache; import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; -import net.osmand.plus.TargetPointsHelper.TargetPoint; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.dashboard.DashLocationFragment; import net.osmand.plus.download.DownloadIndexesThread.DownloadEvents; @@ -361,14 +360,8 @@ public class MapContextMenuFragment extends Fragment implements DownloadEvents { }); final ImageButton buttonWaypoint = (ImageButton) view.findViewById(R.id.context_menu_route_button); - // Correct use of destination vs. waypoit icon on button: - if (getMyApplication().getTargetPointsHelper().getPointToNavigate() == null) { - buttonWaypoint.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_flag_dark, + buttonWaypoint.setImageDrawable(iconsCache.getIcon(R.drawable.map_action_flag_dark, light ? R.color.icon_color : R.color.dashboard_subheader_text_dark)); - } else { - buttonWaypoint.setImageDrawable(iconsCache.getIcon(R.drawable.map_action_waypoints, - light ? R.color.icon_color : R.color.dashboard_subheader_text_dark)); - } buttonWaypoint.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java index f80f1583eb..2cd9ef4e87 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MenuController.java @@ -257,7 +257,7 @@ public abstract class MenuController extends BaseMenuController { public Drawable getSecondLineTypeIcon() { return null; } - public int getFavActionIconId() { return R.drawable.ic_action_fav_dark; } + public int getFavActionIconId() { return R.drawable.map_action_fav_dark; } public String getTypeStr() { return ""; } From c5cc10e77b6d3312a660e0200bc9875e6f14679f Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Wed, 18 Nov 2015 18:16:33 +0300 Subject: [PATCH 2/2] Remove poi_type_tag from context menu --- OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuBuilder.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuBuilder.java b/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuBuilder.java index 0d6a2fa942..273e86c927 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuBuilder.java @@ -29,7 +29,12 @@ public class EditPOIMenuBuilder extends MenuBuilder { OpenstreetmapPoint point = (OpenstreetmapPoint) osmPoint; for (Map.Entry e : point.getEntity().getTags().entrySet()) { - String text = e.getKey() + "=" + e.getValue(); + String text; + if (EditPoiData.POI_TYPE_TAG.equals(e.getKey())) { + text = e.getValue(); + } else { + text = e.getKey() + "=" + e.getValue(); + } buildRow(view, R.drawable.ic_action_info_dark, text, 0, false, 0); } }