Hide lanes widget
This commit is contained in:
parent
f7aa37a235
commit
3e9fe5c3ae
7 changed files with 12 additions and 9 deletions
|
@ -778,7 +778,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
|
|||
}
|
||||
//mapContextMenu.setMapZoom(settings.getMapZoomToShow());
|
||||
mapContextMenu.setMapZoom(tb.getZoom());
|
||||
if (mapLayers.getMapControlsLayer().getMapRouteInfoMenu().isVisible()) {
|
||||
if (MapRouteInfoMenu.isVisible()) {
|
||||
mapContextMenu.showMinimized(latLonToShow, mapLabelToShow, toShow);
|
||||
mapLayers.getMapControlsLayer().getMapRouteInfoMenu().updateMenu();
|
||||
mapView.getAnimatedDraggingThread().startMoving(latLonToShow.getLatitude(),
|
||||
|
|
|
@ -69,6 +69,7 @@ import net.osmand.plus.helpers.MapMarkerDialogHelper.MapMarkersDialogHelperCallb
|
|||
import net.osmand.plus.helpers.WaypointDialogHelper;
|
||||
import net.osmand.plus.helpers.WaypointDialogHelper.WaypointDialogHelperCallbacks;
|
||||
import net.osmand.plus.helpers.WaypointHelper.LocationPointWrapper;
|
||||
import net.osmand.plus.mapcontextmenu.other.MapRouteInfoMenu;
|
||||
import net.osmand.plus.mapcontextmenu.other.RoutePreferencesMenu;
|
||||
import net.osmand.plus.mapcontextmenu.other.RoutePreferencesMenu.LocalRoutingParameter;
|
||||
import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin;
|
||||
|
@ -841,7 +842,7 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis
|
|||
mapActivity.getMapViewTrackingUtilities().setDashboard(null);
|
||||
hide(dashboardView.findViewById(R.id.animateContent), animation);
|
||||
|
||||
if (!mapActivity.getMapLayers().getMapControlsLayer().getMapRouteInfoMenu().isVisible()) {
|
||||
if (!MapRouteInfoMenu.isVisible()) {
|
||||
AndroidUiHelper.updateVisibility(mapActivity.findViewById(R.id.map_route_land_left_margin_external), false);
|
||||
mapActivity.getMapView().setMapPositionX(0);
|
||||
mapActivity.getMapView().refreshMap();
|
||||
|
|
|
@ -71,7 +71,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener {
|
|||
private boolean selectFromMapForTarget;
|
||||
|
||||
private boolean showMenu = false;
|
||||
private boolean visible;
|
||||
private static boolean visible;
|
||||
private MapActivity mapActivity;
|
||||
private MapControlsLayer mapControlsLayer;
|
||||
public static final String TARGET_SELECT = "TARGET_SELECT";
|
||||
|
@ -510,7 +510,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener {
|
|||
return directionInfo;
|
||||
}
|
||||
|
||||
public boolean isVisible() {
|
||||
public static boolean isVisible() {
|
||||
return visible;
|
||||
}
|
||||
|
||||
|
|
|
@ -623,7 +623,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
routePlanningMode = true;
|
||||
}
|
||||
boolean routeFollowingMode = !routePlanningMode && rh.isFollowingMode();
|
||||
boolean dialogOpened = mapRouteInfoMenu.isVisible();
|
||||
boolean dialogOpened = MapRouteInfoMenu.isVisible();
|
||||
boolean showRouteCalculationControls = routePlanningMode ||
|
||||
((app.accessibilityEnabled() || (System.currentTimeMillis() - touchEvent < TIMEOUT_TO_SHOW_BUTTONS)) && routeFollowingMode);
|
||||
updateMyLocation(rh, dialogOpened);
|
||||
|
|
|
@ -562,8 +562,7 @@ public class MapInfoWidgetsFactory {
|
|||
}
|
||||
} else {
|
||||
int di = MapRouteInfoMenu.getDirectionInfo();
|
||||
MapRouteInfoMenu routeInfoMenu = map.getMapLayers().getMapControlsLayer().getMapRouteInfoMenu();
|
||||
if (di >= 0 && routeInfoMenu != null && routeInfoMenu.isVisible() &&
|
||||
if (di >= 0 && MapRouteInfoMenu.isVisible() &&
|
||||
di < routingHelper.getRouteDirections().size()) {
|
||||
showNextTurn = true;
|
||||
RouteDirectionInfo next = routingHelper.getRouteDirections().get(di);
|
||||
|
|
|
@ -18,6 +18,7 @@ import net.osmand.plus.dashboard.DashLocationFragment;
|
|||
import net.osmand.plus.dashboard.DashboardOnMap;
|
||||
import net.osmand.plus.helpers.AndroidUiHelper;
|
||||
import net.osmand.plus.helpers.MapMarkerDialogHelper;
|
||||
import net.osmand.plus.mapcontextmenu.other.MapRouteInfoMenu;
|
||||
import net.osmand.plus.views.AnimateDraggingMapThread;
|
||||
import net.osmand.plus.views.DirectionDrawable;
|
||||
import net.osmand.plus.views.OsmandMapLayer.DrawSettings;
|
||||
|
@ -199,7 +200,7 @@ public class MapMarkersWidgetsFactory {
|
|||
|| !map.getMyApplication().getSettings().MAP_MARKERS_MODE.get().isToolbar()
|
||||
|| map.getMyApplication().getRoutingHelper().isFollowingMode()
|
||||
|| map.getMyApplication().getRoutingHelper().isRoutePlanningMode()
|
||||
|| map.getMapLayers().getMapControlsLayer().getMapRouteInfoMenu().isVisible()
|
||||
|| MapRouteInfoMenu.isVisible()
|
||||
|| addressTopBar.getVisibility() == View.VISIBLE
|
||||
|| map.isTopToolbarActive()) {
|
||||
updateVisibility(false);
|
||||
|
|
|
@ -816,13 +816,15 @@ public class RouteInfoWidgetsFactory {
|
|||
}
|
||||
} else {
|
||||
int di = MapRouteInfoMenu.getDirectionInfo();
|
||||
if (di >= 0 && MapRouteInfoMenu.isControlVisible()
|
||||
if (di >= 0 && MapRouteInfoMenu.isVisible()
|
||||
&& di < rh.getRouteDirections().size()) {
|
||||
RouteDirectionInfo next = rh.getRouteDirections().get(di);
|
||||
if (next != null) {
|
||||
loclanes = next.getTurnType().getLanes();
|
||||
// primary = next.getTurnType();
|
||||
}
|
||||
} else {
|
||||
loclanes = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue