From 6a684e44eabbc946059e068c219db07857be7223 Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Fri, 6 May 2016 13:04:11 +0300 Subject: [PATCH] Returned search to POI selection. --- OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java index 030b5d6591..4cf91c3c31 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java @@ -321,6 +321,9 @@ public class MapActivityLayers { final OsmandApplication app = getApplication(); final PoiFiltersHelper poiFilters = app.getPoiFilters(); final ContextMenuAdapter adapter = new ContextMenuAdapter(); + adapter.addItem(new ContextMenuItem.ItemBuilder() + .setTitleId(R.string.shared_string_search, app) + .setIcon(R.drawable.ic_action_search_dark).createItem()); final List list = new ArrayList<>(); list.add(poiFilters.getCustomPOIFilter()); for (PoiUIFilter f : poiFilters.getTopDefinedPoiFilters()) { @@ -336,7 +339,7 @@ public class MapActivityLayers { builder.setAdapter(listAdapter, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { - PoiUIFilter pf = list.get(which + 1); + PoiUIFilter pf = list.get(which); String filterId = pf.getFilterId(); if (filterId.equals(PoiUIFilter.CUSTOM_FILTER_ID)) { Intent search = new Intent(activity, SearchActivity.class);