diff --git a/OsmAndCore-sample/res/values/styles.xml b/OsmAndCore-sample/res/values/styles.xml
index bdae789d20..e165c50d21 100644
--- a/OsmAndCore-sample/res/values/styles.xml
+++ b/OsmAndCore-sample/res/values/styles.xml
@@ -28,9 +28,8 @@
- @color/list_item_light
- @color/osmo_header_light
- @color/dashboard_subheader_text_light
- -
- @color/dashboard_general_button_text_light
-
+ - @color/dashboard_general_button_text_light
+ - @drawable/expandable_list_item_background_light
- @color/color_black
- @color/color_black
- @color/spinner_list_background_light
diff --git a/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/MainActivity.java b/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/MainActivity.java
index 497c83d838..1e51e47256 100644
--- a/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/MainActivity.java
+++ b/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/MainActivity.java
@@ -25,8 +25,8 @@ import android.view.View;
import android.widget.ImageButton;
import android.widget.TextView;
+import net.osmand.binary.BinaryMapIndexReader;
import net.osmand.core.android.AtlasMapRendererView;
-import net.osmand.core.jni.Amenity;
import net.osmand.core.jni.AmenitySymbolsProvider.AmenitySymbolsGroup;
import net.osmand.core.jni.AreaI;
import net.osmand.core.jni.IBillboardMapSymbol;
@@ -59,14 +59,19 @@ import net.osmand.core.jni.Utilities;
import net.osmand.core.samples.android.sample1.MultiTouchSupport.MultiTouchZoomListener;
import net.osmand.core.samples.android.sample1.data.PointDescription;
import net.osmand.core.samples.android.sample1.mapcontextmenu.MapContextMenu;
-import net.osmand.core.samples.android.sample1.mapcontextmenu.MapMultiSelectionMenu;
+import net.osmand.core.samples.android.sample1.mapcontextmenu.MenuController;
import net.osmand.core.samples.android.sample1.search.QuickSearchDialogFragment;
+import net.osmand.data.Amenity;
import net.osmand.data.LatLon;
+import net.osmand.data.QuadRect;
import net.osmand.data.RotatedTileBox;
+import net.osmand.osm.PoiCategory;
import net.osmand.util.MapUtils;
import java.io.File;
import java.io.FilenameFilter;
+import java.util.ArrayList;
+import java.util.List;
public class MainActivity extends AppCompatActivity {
private static final String TAG = "OsmAndCoreSample";
@@ -98,7 +103,6 @@ public class MainActivity extends AppCompatActivity {
private MultiTouchSupport multiTouchSupport;
private MapContextMenu menu;
- private MapMultiSelectionMenu multiMenu;
// Context pin marker
private MapMarkersCollection contextPinMarkersCollection;
@@ -259,7 +263,6 @@ public class MainActivity extends AppCompatActivity {
menu = new MapContextMenu();
menu.setMainActivity(this);
- multiMenu = new MapMultiSelectionMenu(this);
if (!InstallOsmandAppDialog.show(getSupportFragmentManager(), this)
&& externalStoragePermissionGranted) {
@@ -377,8 +380,8 @@ public class MainActivity extends AppCompatActivity {
public boolean showContextMenu(@NonNull LatLon latLon,
@Nullable PointDescription pointDescription,
@Nullable Object object) {
- if (multiMenu.isVisible()) {
- multiMenu.hide();
+ if (menu.getMultiSelectionMenu().isVisible()) {
+ menu.getMultiSelectionMenu().hide();
}
if (!getBox().containsLatLon(latLon)) {
menu.setMapCenter(latLon);
@@ -388,6 +391,16 @@ public class MainActivity extends AppCompatActivity {
return true;
}
+ private void showContextMenuForSelectedObjects(final LatLon latLon, final List