aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/maps
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/maps')
-rw-r--r--main/src/cgeo/geocaching/maps/CGeoMap.java7
-rw-r--r--main/src/cgeo/geocaching/maps/google/GoogleMapView.java6
-rw-r--r--main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java2
-rw-r--r--main/src/cgeo/geocaching/maps/interfaces/OnMapDragListener.java (renamed from main/src/cgeo/geocaching/maps/interfaces/OnDragListener.java)2
-rw-r--r--main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java6
5 files changed, 13 insertions, 10 deletions
diff --git a/main/src/cgeo/geocaching/maps/CGeoMap.java b/main/src/cgeo/geocaching/maps/CGeoMap.java
index 0ddc4c3..5d8c0db 100644
--- a/main/src/cgeo/geocaching/maps/CGeoMap.java
+++ b/main/src/cgeo/geocaching/maps/CGeoMap.java
@@ -29,7 +29,7 @@ import cgeo.geocaching.maps.interfaces.MapActivityImpl;
import cgeo.geocaching.maps.interfaces.MapControllerImpl;
import cgeo.geocaching.maps.interfaces.MapProvider;
import cgeo.geocaching.maps.interfaces.MapViewImpl;
-import cgeo.geocaching.maps.interfaces.OnDragListener;
+import cgeo.geocaching.maps.interfaces.OnMapDragListener;
import cgeo.geocaching.maps.interfaces.OtherCachersOverlayItemImpl;
import cgeo.geocaching.utils.CancellableHandler;
@@ -70,7 +70,7 @@ import java.util.Set;
/**
* Class representing the Map in c:geo
*/
-public class CGeoMap extends AbstractMap implements OnDragListener, ViewFactory {
+public class CGeoMap extends AbstractMap implements OnMapDragListener, ViewFactory {
/** Handler Messages */
private static final int HIDE_PROGRESS = 0;
@@ -597,12 +597,14 @@ public class CGeoMap extends AbstractMap implements OnDragListener, ViewFactory
switch (id) {
case MENU_TRAIL_MODE:
Settings.setMapTrail(!Settings.isMapTrail());
+ ActivityMixin.invalidateOptionsMenu(activity);
return true;
case MENU_MAP_LIVE:
Settings.setLiveMap(!Settings.isLiveMap());
liveChanged = true;
search = null;
searchIntent = null;
+ ActivityMixin.invalidateOptionsMenu(activity);
return true;
case MENU_STORE_CACHES:
if (live && !isLoading() && CollectionUtils.isNotEmpty(caches)) {
@@ -688,6 +690,7 @@ public class CGeoMap extends AbstractMap implements OnDragListener, ViewFactory
overlayCaches.switchCircles();
mapView.repaintRequired(overlayCaches);
+ ActivityMixin.invalidateOptionsMenu(activity);
return true;
case MENU_AS_LIST: {
final SearchResult searchResult = new SearchResult();
diff --git a/main/src/cgeo/geocaching/maps/google/GoogleMapView.java b/main/src/cgeo/geocaching/maps/google/GoogleMapView.java
index 65e0ed1..9d9f3c9 100644
--- a/main/src/cgeo/geocaching/maps/google/GoogleMapView.java
+++ b/main/src/cgeo/geocaching/maps/google/GoogleMapView.java
@@ -12,7 +12,7 @@ import cgeo.geocaching.maps.interfaces.GeoPointImpl;
import cgeo.geocaching.maps.interfaces.MapControllerImpl;
import cgeo.geocaching.maps.interfaces.MapProjectionImpl;
import cgeo.geocaching.maps.interfaces.MapViewImpl;
-import cgeo.geocaching.maps.interfaces.OnDragListener;
+import cgeo.geocaching.maps.interfaces.OnMapDragListener;
import cgeo.geocaching.maps.interfaces.OverlayImpl;
import cgeo.geocaching.maps.interfaces.OverlayImpl.overlayType;
@@ -34,7 +34,7 @@ import android.widget.FrameLayout;
public class GoogleMapView extends MapView implements MapViewImpl {
private GestureDetector gestureDetector;
- private OnDragListener onDragListener;
+ private OnMapDragListener onDragListener;
public GoogleMapView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -151,7 +151,7 @@ public class GoogleMapView extends MapView implements MapViewImpl {
}
@Override
- public void setOnDragListener(OnDragListener onDragListener) {
+ public void setOnDragListener(OnMapDragListener onDragListener) {
this.onDragListener = onDragListener;
}
diff --git a/main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java b/main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java
index ad35d26..08eaaf4 100644
--- a/main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java
+++ b/main/src/cgeo/geocaching/maps/interfaces/MapViewImpl.java
@@ -69,7 +69,7 @@ public interface MapViewImpl {
*/
void repaintRequired(GeneralOverlay overlay);
- void setOnDragListener(OnDragListener onDragListener);
+ void setOnDragListener(OnMapDragListener onDragListener);
/**
* Indicates if overlay text or line colours should be dark (normal case)
diff --git a/main/src/cgeo/geocaching/maps/interfaces/OnDragListener.java b/main/src/cgeo/geocaching/maps/interfaces/OnMapDragListener.java
index 285aafa..0e51b32 100644
--- a/main/src/cgeo/geocaching/maps/interfaces/OnDragListener.java
+++ b/main/src/cgeo/geocaching/maps/interfaces/OnMapDragListener.java
@@ -6,7 +6,7 @@ package cgeo.geocaching.maps.interfaces;
* @author cachapa
*
*/
-public interface OnDragListener {
+public interface OnMapDragListener {
public void onDrag();
diff --git a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java
index 9a64980..bcb6e61 100644
--- a/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java
+++ b/main/src/cgeo/geocaching/maps/mapsforge/MapsforgeMapView.java
@@ -10,7 +10,7 @@ import cgeo.geocaching.maps.interfaces.GeoPointImpl;
import cgeo.geocaching.maps.interfaces.MapControllerImpl;
import cgeo.geocaching.maps.interfaces.MapProjectionImpl;
import cgeo.geocaching.maps.interfaces.MapViewImpl;
-import cgeo.geocaching.maps.interfaces.OnDragListener;
+import cgeo.geocaching.maps.interfaces.OnMapDragListener;
import cgeo.geocaching.maps.interfaces.OverlayImpl;
import cgeo.geocaching.maps.interfaces.OverlayImpl.overlayType;
@@ -33,7 +33,7 @@ import android.view.MotionEvent;
public class MapsforgeMapView extends MapView implements MapViewImpl {
private GestureDetector gestureDetector;
- private OnDragListener onDragListener;
+ private OnMapDragListener onDragListener;
public MapsforgeMapView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -205,7 +205,7 @@ public class MapsforgeMapView extends MapView implements MapViewImpl {
}
@Override
- public void setOnDragListener(OnDragListener onDragListener) {
+ public void setOnDragListener(OnMapDragListener onDragListener) {
this.onDragListener = onDragListener;
}