Merge pull request #4788 from osmandapp/one_tap_active

One tap active
This commit is contained in:
Pavel Ratushnyi 2017-11-20 16:25:49 +02:00 committed by GitHub
commit 790297ef49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 255 additions and 7 deletions

View file

@ -348,7 +348,6 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/content_padding"
android:layout_marginTop="@dimen/content_padding" android:layout_marginTop="@dimen/content_padding"
android:background="?attr/bg_card" android:background="?attr/bg_card"
android:orientation="vertical"> android:orientation="vertical">
@ -404,6 +403,65 @@
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/content_padding"
android:layout_marginTop="@dimen/content_padding"
android:background="?attr/bg_card"
android:orientation="vertical">
<LinearLayout
android:id="@+id/one_tap_active_row"
android:layout_width="match_parent"
android:layout_height="@dimen/bottom_sheet_title_height"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/one_tap_active"
android:textAppearance="@style/TextAppearance.ListItemTitle"/>
<android.support.v7.widget.SwitchCompat
android:id="@+id/one_tap_active_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|end"
android:layout_marginLeft="@dimen/bottom_sheet_content_margin_small"
android:layout_marginStart="@dimen/bottom_sheet_content_margin_small"
android:background="@null"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding"
android:background="?attr/dashboard_divider"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
android:paddingBottom="@dimen/content_padding_small"
android:paddingTop="@dimen/content_padding_small"
android:text="@string/one_tap_active_descr"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"/>
</LinearLayout>
</LinearLayout> </LinearLayout>
</com.github.ksoichiro.android.observablescrollview.ObservableScrollView> </com.github.ksoichiro.android.observablescrollview.ObservableScrollView>

View file

@ -398,6 +398,65 @@
<include layout="@layout/list_item_divider"/> <include layout="@layout/list_item_divider"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/bg_color"
android:orientation="vertical">
<LinearLayout
android:id="@+id/one_tap_active_row"
android:layout_width="match_parent"
android:layout_height="@dimen/bottom_sheet_title_height"
android:background="?attr/selectableItemBackground"
android:paddingLeft="@dimen/content_padding"
android:paddingRight="@dimen/content_padding">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/one_tap_active"
android:textAppearance="@style/TextAppearance.ListItemTitle"/>
<android.support.v7.widget.SwitchCompat
android:id="@+id/one_tap_active_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|end"
android:layout_marginLeft="@dimen/bottom_sheet_content_margin_small"
android:layout_marginStart="@dimen/bottom_sheet_content_margin_small"
android:background="@null"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginStart="@dimen/content_padding"
android:background="?attr/dashboard_divider"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/content_padding"
android:layout_marginRight="@dimen/content_padding"
android:paddingBottom="@dimen/content_padding_small"
android:paddingTop="@dimen/content_padding_small"
android:text="@string/one_tap_active_descr"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/default_desc_text_size"/>
</LinearLayout>
<include layout="@layout/list_item_divider"/>
</LinearLayout> </LinearLayout>
</com.github.ksoichiro.android.observablescrollview.ObservableScrollView> </com.github.ksoichiro.android.observablescrollview.ObservableScrollView>

View file

@ -9,6 +9,9 @@
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated). 3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
--> -->
<string name="marker_activated">Marker %s activated.</string>
<string name="one_tap_active_descr">Tap on marker on the map, move it to the first place in active markers, without opening context menu.</string>
<string name="one_tap_active">One tap active</string>
<string name="looking_for_tracks_with_waypoints">Looking for tracks with waypoints</string> <string name="looking_for_tracks_with_waypoints">Looking for tracks with waypoints</string>
<string name="shared_string_more_without_dots">More</string> <string name="shared_string_more_without_dots">More</string>
<string name="appearance_on_the_map">Appearance on the map</string> <string name="appearance_on_the_map">Appearance on the map</string>

View file

@ -716,6 +716,8 @@ public class OsmandSettings {
public final CommonPreference<Boolean> SHOW_LINES_TO_FIRST_MARKERS = new BooleanPreference("show_lines_to_first_markers", false).makeProfile(); public final CommonPreference<Boolean> SHOW_LINES_TO_FIRST_MARKERS = new BooleanPreference("show_lines_to_first_markers", false).makeProfile();
public final CommonPreference<Boolean> SHOW_ARROWS_TO_FIRST_MARKERS = new BooleanPreference("show_arrows_to_first_markers", false).makeProfile(); public final CommonPreference<Boolean> SHOW_ARROWS_TO_FIRST_MARKERS = new BooleanPreference("show_arrows_to_first_markers", false).makeProfile();
public final CommonPreference<Boolean> SELECT_MARKER_ON_SINGLE_TAP = new BooleanPreference("select_marker_on_single_tap", false).makeProfile();
public final CommonPreference<Boolean> USE_MAPILLARY_FILTER = new BooleanPreference("use_mapillary_filters", false).makeGlobal(); public final CommonPreference<Boolean> USE_MAPILLARY_FILTER = new BooleanPreference("use_mapillary_filters", false).makeGlobal();
public final CommonPreference<String> MAPILLARY_FILTER_USER_KEY = new StringPreference("mapillary_filter_user_key", "").makeGlobal(); public final CommonPreference<String> MAPILLARY_FILTER_USER_KEY = new StringPreference("mapillary_filter_user_key", "").makeGlobal();
public final CommonPreference<String> MAPILLARY_FILTER_USERNAME = new StringPreference("mapillary_filter_username", "").makeGlobal(); public final CommonPreference<String> MAPILLARY_FILTER_USERNAME = new StringPreference("mapillary_filter_username", "").makeGlobal();

View file

@ -182,6 +182,11 @@ public class AudioNotesLayer extends OsmandMapLayer implements
return o instanceof Recording; return o instanceof Recording;
} }
@Override
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
return false;
}
@Override @Override
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> objects) { public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> objects) {
if (tileBox.getZoom() >= startZoom) { if (tileBox.getZoom() >= startZoom) {

View file

@ -589,6 +589,11 @@ public class DistanceCalculatorPlugin extends OsmandPlugin {
return false; return false;
} }
@Override
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
return false;
}
@Override @Override
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) { public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) {
getMPointsFromPoint(tileBox, point, o); getMPointsFromPoint(tileBox, point, o);

View file

@ -333,6 +333,11 @@ class MapillaryVectorLayer extends MapTileLayer implements MapillaryLayer, ICont
return o instanceof MapillaryImage; return o instanceof MapillaryImage;
} }
@Override
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
return false;
}
private void getImagesFromPoint(RotatedTileBox tb, PointF point, List<? super MapillaryImage> images) { private void getImagesFromPoint(RotatedTileBox tb, PointF point, List<? super MapillaryImage> images) {
Map<QuadPointDouble, Map> points = this.visiblePoints; Map<QuadPointDouble, Map> points = this.visiblePoints;
if (points != null) { if (points != null) {

View file

@ -182,6 +182,15 @@ public class DirectionIndicationDialogFragment extends BaseOsmAndDialogFragment
} }
}); });
final CompoundButton oneTapActiveToggle = (CompoundButton) mainView.findViewById(R.id.one_tap_active_switch);
oneTapActiveToggle.setChecked(settings.SELECT_MARKER_ON_SINGLE_TAP.get());
mainView.findViewById(R.id.one_tap_active_row).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
updateChecked(settings.SELECT_MARKER_ON_SINGLE_TAP, oneTapActiveToggle);
}
});
return mainView; return mainView;
} }

View file

@ -409,6 +409,11 @@ public class MeasurementToolLayer extends OsmandMapLayer implements ContextMenuL
return !isInMeasurementMode(); return !isInMeasurementMode();
} }
@Override
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
return false;
}
interface OnSingleTapListener { interface OnSingleTapListener {
void onAddPoint(); void onAddPoint();

View file

@ -512,6 +512,11 @@ public class OsmBugsLayer extends OsmandMapLayer implements IContextMenuProvider
return o instanceof OpenStreetNote; return o instanceof OpenStreetNote;
} }
@Override
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
return false;
}
@Override @Override
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> res) { public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> res) {
if (tileBox.getZoom() >= startZoom) { if (tileBox.getZoom() >= startZoom) {

View file

@ -160,6 +160,11 @@ public class OsmEditsLayer extends OsmandMapLayer implements ContextMenuLayer.IC
return o instanceof OsmPoint; return o instanceof OsmPoint;
} }
@Override
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
return false;
}
@Override @Override
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) { public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) {
if (tileBox.getZoom() >= startZoom) { if (tileBox.getZoom() >= startZoom) {

View file

@ -13,11 +13,11 @@ import android.graphics.PointF;
import android.os.Handler; import android.os.Handler;
import android.util.DisplayMetrics; import android.util.DisplayMetrics;
import android.view.WindowManager; import android.view.WindowManager;
import net.osmand.Location; import net.osmand.Location;
import net.osmand.data.LatLon; import net.osmand.data.LatLon;
import net.osmand.data.PointDescription; import net.osmand.data.PointDescription;
import net.osmand.data.RotatedTileBox; import net.osmand.data.RotatedTileBox;
import net.osmand.plus.OsmAndFormatter;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.TargetPointsHelper; import net.osmand.plus.TargetPointsHelper;
import net.osmand.plus.TargetPointsHelper.TargetPoint; import net.osmand.plus.TargetPointsHelper.TargetPoint;
@ -212,6 +212,11 @@ public class OsMoPositionLayer extends OsmandMapLayer implements ContextMenuLaye
return o instanceof OsMoDevice; return o instanceof OsMoDevice;
} }
@Override
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
return false;
}
@Override @Override
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) { public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) {
getOsmoFromPoint(tileBox, point, o); getOsmoFromPoint(tileBox, point, o);

View file

@ -135,6 +135,11 @@ public class ParkingPositionLayer extends OsmandMapLayer implements
return o == getParkingPoint(); return o == getParkingPoint();
} }
@Override
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
return false;
}
@Override @Override
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) { public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) {
getParkingFromPoint(tileBox, point, o); getParkingFromPoint(tileBox, point, o);

View file

@ -42,6 +42,11 @@ public class RoutePointsLayer extends OsmandMapLayer implements ContextMenuLaye
return false; return false;
} }
@Override
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
return false;
}
@Override @Override
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) { public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) {

View file

@ -128,6 +128,11 @@ public class AidlMapLayer extends OsmandMapLayer implements IContextMenuProvider
return o instanceof AMapPoint; return o instanceof AMapPoint;
} }
@Override
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
return false;
}
@Override @Override
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) { public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) {
getFromPoint(tileBox, point, o); getFromPoint(tileBox, point, o);

View file

@ -642,6 +642,12 @@ public class ContextMenuLayer extends OsmandMapLayer {
} }
} }
} }
for (Map.Entry<Object, IContextMenuProvider> entry : selectedObjects.entrySet()) {
IContextMenuProvider provider = entry.getValue();
if (provider != null && provider.runExclusiveAction(entry.getKey(), showUnknownLocation)) {
return true;
}
}
if (selectedObjects.size() == 1) { if (selectedObjects.size() == 1) {
Object selectedObj = selectedObjects.keySet().iterator().next(); Object selectedObj = selectedObjects.keySet().iterator().next();
LatLon latLon = objectLatLon; LatLon latLon = objectLatLon;
@ -924,6 +930,7 @@ public class ContextMenuLayer extends OsmandMapLayer {
boolean isObjectClickable(Object o); boolean isObjectClickable(Object o);
boolean runExclusiveAction(@Nullable Object o, boolean unknownLocation);
} }
public interface IMoveObjectProvider { public interface IMoveObjectProvider {

View file

@ -11,9 +11,9 @@ import android.graphics.PointF;
import android.text.TextPaint; import android.text.TextPaint;
import android.util.DisplayMetrics; import android.util.DisplayMetrics;
import android.view.WindowManager; import android.view.WindowManager;
import net.osmand.IndexConstants; import net.osmand.IndexConstants;
import net.osmand.binary.BinaryMapDataObject; import net.osmand.binary.BinaryMapDataObject;
import net.osmand.binary.BinaryMapIndexReader;
import net.osmand.binary.BinaryMapIndexReader.TagValuePair; import net.osmand.binary.BinaryMapIndexReader.TagValuePair;
import net.osmand.data.LatLon; import net.osmand.data.LatLon;
import net.osmand.data.PointDescription; import net.osmand.data.PointDescription;
@ -458,6 +458,11 @@ public class DownloadedRegionsLayer extends OsmandMapLayer implements IContextMe
return false; return false;
} }
@Override
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
return false;
}
private void getWorldRegionFromPoint(RotatedTileBox tb, PointF point, List<? super DownloadMapObject> dataObjects) { private void getWorldRegionFromPoint(RotatedTileBox tb, PointF point, List<? super DownloadMapObject> dataObjects) {
int zoom = tb.getZoom(); int zoom = tb.getZoom();
if (zoom >= ZOOM_TO_SHOW_SELECTION_ST && zoom < ZOOM_TO_SHOW_SELECTION if (zoom >= ZOOM_TO_SHOW_SELECTION_ST && zoom < ZOOM_TO_SHOW_SELECTION

View file

@ -209,6 +209,11 @@ public class FavouritesLayer extends OsmandMapLayer implements ContextMenuLayer.
return o instanceof FavouritePoint && o != contextMenuLayer.getMoveableObject(); return o instanceof FavouritePoint && o != contextMenuLayer.getMoveableObject();
} }
@Override
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
return false;
}
@Override @Override
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> res) { public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> res) {
if (this.settings.SHOW_FAVORITES.get() && tileBox.getZoom() >= startZoom) { if (this.settings.SHOW_FAVORITES.get() && tileBox.getZoom() >= startZoom) {

View file

@ -564,6 +564,11 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
return o instanceof WptPt; return o instanceof WptPt;
} }
@Override
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
return false;
}
@Override @Override
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> res) { public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> res) {
if (tileBox.getZoom() >= startZoom) { if (tileBox.getZoom() >= startZoom) {

View file

@ -161,6 +161,11 @@ public class ImpassableRoadsLayer extends OsmandMapLayer implements
return false; return false;
} }
@Override
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
return false;
}
@Override @Override
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) { public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) {
if (tileBox.getZoom() >= startZoom) { if (tileBox.getZoom() >= startZoom) {

View file

@ -14,9 +14,11 @@ import android.os.Handler;
import android.os.Message; import android.os.Message;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.support.design.widget.Snackbar;
import android.support.v4.content.ContextCompat; import android.support.v4.content.ContextCompat;
import android.view.GestureDetector; import android.view.GestureDetector;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.View;
import net.osmand.Location; import net.osmand.Location;
import net.osmand.data.LatLon; import net.osmand.data.LatLon;
@ -481,6 +483,27 @@ public class MapMarkersLayer extends OsmandMapLayer implements IContextMenuProvi
return false; return false;
} }
@Override
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
if (unknownLocation || o == null || !(o instanceof MapMarker)
|| !map.getMyApplication().getSettings().SELECT_MARKER_ON_SINGLE_TAP.get()) {
return false;
}
final MapMarkersHelper helper = map.getMyApplication().getMapMarkersHelper();
final MapMarker old = helper.getMapMarkers().get(0);
helper.moveMarkerToTop((MapMarker) o);
String title = map.getString(R.string.marker_activated, helper.getMapMarkers().get(0).getName(map));
Snackbar.make(map.findViewById(R.id.bottomFragmentContainer), title, Snackbar.LENGTH_LONG)
.setAction(R.string.shared_string_cancel, new View.OnClickListener() {
@Override
public void onClick(View v) {
helper.moveMarkerToTop(old);
}
})
.show();
return true;
}
@Override @Override
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) { public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) {
if (tileBox.getZoom() < 3 || !map.getMyApplication().getSettings().USE_MAP_MARKERS.get()) { if (tileBox.getZoom() < 3 || !map.getMyApplication().getSettings().USE_MAP_MARKERS.get()) {

View file

@ -1,7 +1,6 @@
package net.osmand.plus.views; package net.osmand.plus.views;
import android.app.Dialog; import android.app.Dialog;
import android.content.ContentResolver;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.res.Resources; import android.content.res.Resources;
@ -15,7 +14,6 @@ import android.graphics.PorterDuff;
import android.graphics.PorterDuffColorFilter; import android.graphics.PorterDuffColorFilter;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.net.Uri; import android.net.Uri;
import android.provider.Settings;
import android.support.v4.content.ContextCompat; import android.support.v4.content.ContextCompat;
import android.support.v4.view.MenuItemCompat; import android.support.v4.view.MenuItemCompat;
import android.support.v7.widget.PopupMenu; import android.support.v7.widget.PopupMenu;
@ -35,6 +33,7 @@ import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams; import android.widget.LinearLayout.LayoutParams;
import android.widget.ScrollView; import android.widget.ScrollView;
import android.widget.TextView; import android.widget.TextView;
import net.osmand.AndroidUtils; import net.osmand.AndroidUtils;
import net.osmand.PlatformUtil; import net.osmand.PlatformUtil;
import net.osmand.ResultMatcher; import net.osmand.ResultMatcher;
@ -564,6 +563,11 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon
return o instanceof Amenity; return o instanceof Amenity;
} }
@Override
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
return false;
}
@Override @Override
public LatLon getTextLocation(Amenity o) { public LatLon getTextLocation(Amenity o) {
return o.getLocation(); return o.getLocation();

View file

@ -215,6 +215,11 @@ public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLay
return false; return false;
} }
@Override
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
return false;
}
private LatLon getMyLocation() { private LatLon getMyLocation() {
Location location = locationProvider.getLastKnownLocation(); Location location = locationProvider.getLastKnownLocation();
if (location != null) { if (location != null) {

View file

@ -14,7 +14,6 @@ import android.support.v4.content.ContextCompat;
import net.osmand.data.LatLon; import net.osmand.data.LatLon;
import net.osmand.data.PointDescription; import net.osmand.data.PointDescription;
import net.osmand.data.QuadPoint;
import net.osmand.data.RotatedTileBox; import net.osmand.data.RotatedTileBox;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.TargetPointsHelper; import net.osmand.plus.TargetPointsHelper;
@ -22,7 +21,6 @@ import net.osmand.plus.TargetPointsHelper.TargetPoint;
import net.osmand.plus.activities.MapActivity; import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.views.ContextMenuLayer.IContextMenuProvider; import net.osmand.plus.views.ContextMenuLayer.IContextMenuProvider;
import java.util.Iterator;
import java.util.List; import java.util.List;
public class PointNavigationLayer extends OsmandMapLayer implements public class PointNavigationLayer extends OsmandMapLayer implements
@ -180,6 +178,11 @@ public class PointNavigationLayer extends OsmandMapLayer implements
return false; return false;
} }
@Override
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
return false;
}
@Override @Override
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) { public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> o) {
if (tileBox.getZoom() >= 3) { if (tileBox.getZoom() >= 3) {

View file

@ -279,6 +279,11 @@ public class TransportStopsLayer extends OsmandMapLayer implements ContextMenuLa
return false; return false;
} }
@Override
public boolean runExclusiveAction(Object o, boolean unknownLocation) {
return false;
}
@Override @Override
public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> res) { public void collectObjectsFromPoint(PointF point, RotatedTileBox tileBox, List<Object> res) {
if(tileBox.getZoom() >= startZoomRoute && route != null) { if(tileBox.getZoom() >= startZoomRoute && route != null) {