Merge pull request #10614 from osmandapp/Visibility_widget_track_menu_fragment
Visibility widget track menu fragment
This commit is contained in:
commit
2cd631f162
4 changed files with 6 additions and 12 deletions
|
@ -871,19 +871,18 @@ public class MapControlsLayer extends OsmandMapLayer {
|
||||||
boolean showBottomMenuButtons = (showRouteCalculationControls || !routeFollowingMode)
|
boolean showBottomMenuButtons = (showRouteCalculationControls || !routeFollowingMode)
|
||||||
&& !isInMovingMarkerMode() && !isInGpxDetailsMode() && !isInMeasurementToolMode()
|
&& !isInMovingMarkerMode() && !isInGpxDetailsMode() && !isInMeasurementToolMode()
|
||||||
&& !isInPlanRouteMode() && !contextMenuOpened && !isInChoosingRoutesMode()
|
&& !isInPlanRouteMode() && !contextMenuOpened && !isInChoosingRoutesMode()
|
||||||
&& !isInWaypointsChoosingMode() && !isInFollowTrackMode() && !isInTrackAppearanceMode()
|
&& !isInWaypointsChoosingMode() && !isInFollowTrackMode() && !isInTrackAppearanceMode();
|
||||||
&& !isInTrackMenuMode();
|
|
||||||
routePlanningBtn.updateVisibility(showBottomMenuButtons);
|
routePlanningBtn.updateVisibility(showBottomMenuButtons);
|
||||||
menuControl.updateVisibility(showBottomMenuButtons);
|
menuControl.updateVisibility(showBottomMenuButtons);
|
||||||
|
|
||||||
boolean showZoomButtons = !routeDialogOpened && !contextMenuOpened && !isInTrackAppearanceMode()
|
boolean showZoomButtons = !routeDialogOpened && !contextMenuOpened && !isInTrackAppearanceMode()
|
||||||
&& !isInTrackMenuMode() && (!isInGpxApproximationMode() || !isPotrait())
|
&& (!isInGpxApproximationMode() || !isPotrait())
|
||||||
&& !isInFollowTrackMode() && (!isInChoosingRoutesMode() || !isInWaypointsChoosingMode() || !portrait);
|
&& !isInFollowTrackMode() && (!isInChoosingRoutesMode() || !isInWaypointsChoosingMode() || !portrait);
|
||||||
mapZoomIn.updateVisibility(showZoomButtons);
|
mapZoomIn.updateVisibility(showZoomButtons);
|
||||||
mapZoomOut.updateVisibility(showZoomButtons);
|
mapZoomOut.updateVisibility(showZoomButtons);
|
||||||
|
|
||||||
boolean forceHideCompass = routeDialogOpened || trackDialogOpened || isInMeasurementToolMode()
|
boolean forceHideCompass = routeDialogOpened || trackDialogOpened || isInMeasurementToolMode()
|
||||||
|| isInPlanRouteMode() || contextMenuOpened || isInChoosingRoutesMode() || isInTrackMenuMode()
|
|| isInPlanRouteMode() || contextMenuOpened || isInChoosingRoutesMode()
|
||||||
|| isInTrackAppearanceMode() || isInWaypointsChoosingMode() || isInFollowTrackMode();
|
|| isInTrackAppearanceMode() || isInWaypointsChoosingMode() || isInFollowTrackMode();
|
||||||
compassHud.forceHideCompass = forceHideCompass;
|
compassHud.forceHideCompass = forceHideCompass;
|
||||||
compassHud.updateVisibility(!forceHideCompass && shouldShowCompass());
|
compassHud.updateVisibility(!forceHideCompass && shouldShowCompass());
|
||||||
|
@ -895,8 +894,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
||||||
}
|
}
|
||||||
boolean showTopButtons = !routeDialogOpened && !trackDialogOpened && !contextMenuOpened
|
boolean showTopButtons = !routeDialogOpened && !trackDialogOpened && !contextMenuOpened
|
||||||
&& !isInMeasurementToolMode() && !isInPlanRouteMode() && !isInChoosingRoutesMode()
|
&& !isInMeasurementToolMode() && !isInPlanRouteMode() && !isInChoosingRoutesMode()
|
||||||
&& !isInTrackAppearanceMode() && !isInWaypointsChoosingMode() && !isInFollowTrackMode()
|
&& !isInTrackAppearanceMode() && !isInWaypointsChoosingMode() && !isInFollowTrackMode();
|
||||||
&& !isInTrackMenuMode();
|
|
||||||
layersHud.updateVisibility(showTopButtons);
|
layersHud.updateVisibility(showTopButtons);
|
||||||
quickSearchHud.updateVisibility(showTopButtons);
|
quickSearchHud.updateVisibility(showTopButtons);
|
||||||
|
|
||||||
|
@ -1023,8 +1021,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
||||||
boolean tracked = mapActivity.getMapViewTrackingUtilities().isMapLinkedToLocation();
|
boolean tracked = mapActivity.getMapViewTrackingUtilities().isMapLinkedToLocation();
|
||||||
boolean visible = !(tracked && rh.isFollowingMode()) && (!isInGpxApproximationMode() || !isPotrait());
|
boolean visible = !(tracked && rh.isFollowingMode()) && (!isInGpxApproximationMode() || !isPotrait());
|
||||||
backToLocationControl.updateVisibility(visible && !dialogOpened && !isInPlanRouteMode()
|
backToLocationControl.updateVisibility(visible && !dialogOpened && !isInPlanRouteMode()
|
||||||
&& !isInTrackAppearanceMode() && !isInTrackMenuMode()
|
&& !isInTrackAppearanceMode() && (!isInChoosingRoutesMode() || !isInWaypointsChoosingMode() || !isInFollowTrackMode() || !isPotrait()));
|
||||||
&& (!isInChoosingRoutesMode() || !isInWaypointsChoosingMode() || !isInFollowTrackMode() || !isPotrait()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onSingleTap(PointF point, RotatedTileBox tileBox) {
|
public boolean onSingleTap(PointF point, RotatedTileBox tileBox) {
|
||||||
|
|
|
@ -425,7 +425,6 @@ public class MapQuickActionLayer extends OsmandMapLayer implements QuickActionRe
|
||||||
measurementToolLayer.isInMeasurementMode() ||
|
measurementToolLayer.isInMeasurementMode() ||
|
||||||
mapMarkersLayer.isInPlanRouteMode() ||
|
mapMarkersLayer.isInPlanRouteMode() ||
|
||||||
gpxLayer.isInTrackAppearanceMode() ||
|
gpxLayer.isInTrackAppearanceMode() ||
|
||||||
mapControlsLayer.isInTrackMenuMode() ||
|
|
||||||
mapRouteInfoMenu.isVisible() ||
|
mapRouteInfoMenu.isVisible() ||
|
||||||
MapRouteInfoMenu.chooseRoutesVisible ||
|
MapRouteInfoMenu.chooseRoutesVisible ||
|
||||||
MapRouteInfoMenu.waypointsVisible ||
|
MapRouteInfoMenu.waypointsVisible ||
|
||||||
|
|
|
@ -1235,7 +1235,6 @@ public class MapInfoWidgetsFactory {
|
||||||
boolean visible = settings.SHOW_COORDINATES_WIDGET.get() && map.getContextMenu().shouldShowTopControls()
|
boolean visible = settings.SHOW_COORDINATES_WIDGET.get() && map.getContextMenu().shouldShowTopControls()
|
||||||
&& map.getMapRouteInfoMenu().shouldShowTopControls() && !map.isTopToolbarActive()
|
&& map.getMapRouteInfoMenu().shouldShowTopControls() && !map.isTopToolbarActive()
|
||||||
&& !map.getMapLayers().getGpxLayer().isInTrackAppearanceMode()
|
&& !map.getMapLayers().getGpxLayer().isInTrackAppearanceMode()
|
||||||
&& !map.getMapLayers().getMapControlsLayer().isInTrackMenuMode()
|
|
||||||
&& !MapRouteInfoMenu.chooseRoutesVisible && !MapRouteInfoMenu.waypointsVisible
|
&& !MapRouteInfoMenu.chooseRoutesVisible && !MapRouteInfoMenu.waypointsVisible
|
||||||
&& !MapRouteInfoMenu.followTrackVisible;
|
&& !MapRouteInfoMenu.followTrackVisible;
|
||||||
|
|
||||||
|
|
|
@ -193,8 +193,7 @@ public class MapMarkersWidgetsFactory {
|
||||||
|| map.isTopToolbarActive()
|
|| map.isTopToolbarActive()
|
||||||
|| !map.getContextMenu().shouldShowTopControls()
|
|| !map.getContextMenu().shouldShowTopControls()
|
||||||
|| map.getMapLayers().getGpxLayer().isInTrackAppearanceMode()
|
|| map.getMapLayers().getGpxLayer().isInTrackAppearanceMode()
|
||||||
|| map.getMapLayers().getMapMarkersLayer().isInPlanRouteMode()
|
|| map.getMapLayers().getMapMarkersLayer().isInPlanRouteMode()) {
|
||||||
|| map.getMapLayers().getMapControlsLayer().isInTrackMenuMode()) {
|
|
||||||
updateVisibility(false);
|
updateVisibility(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue