Rename variable and method
This commit is contained in:
parent
d2263b6152
commit
d00eb9343f
3 changed files with 13 additions and 13 deletions
|
@ -368,7 +368,7 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
|
|||
fragmentRef.get().centerMarkerLocation();
|
||||
}
|
||||
}
|
||||
updateWidgetsVisibility();
|
||||
updateControlsVisibility();
|
||||
}
|
||||
|
||||
public void show(@NonNull LatLon latLon,
|
||||
|
@ -377,7 +377,7 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
|
|||
if (init(latLon, pointDescription, object)) {
|
||||
showInternal();
|
||||
}
|
||||
updateWidgetsVisibility();
|
||||
updateControlsVisibility();
|
||||
}
|
||||
|
||||
private void showInternal() {
|
||||
|
@ -448,10 +448,10 @@ public class MapContextMenu extends MenuTitleController implements StateChangedL
|
|||
if (fragmentRef != null) {
|
||||
fragmentRef.get().dismissMenu();
|
||||
}
|
||||
updateWidgetsVisibility();
|
||||
updateControlsVisibility();
|
||||
}
|
||||
|
||||
public void updateWidgetsVisibility() {
|
||||
public void updateControlsVisibility() {
|
||||
int visibility = shouldShowControls() ? View.VISIBLE : View.GONE;
|
||||
mapActivity.findViewById(R.id.map_center_info).setVisibility(visibility);
|
||||
mapActivity.findViewById(R.id.map_left_widgets_panel).setVisibility(visibility);
|
||||
|
|
|
@ -525,7 +525,7 @@ public class MapContextMenuFragment extends Fragment implements DownloadEvents {
|
|||
boolean needMapAdjust = oldMenuState != newMenuState && newMenuState != MenuState.FULL_SCREEN;
|
||||
|
||||
if (newMenuState != oldMenuState) {
|
||||
menu.updateWidgetsVisibility();
|
||||
menu.updateControlsVisibility();
|
||||
doBeforeMenuStateChange(oldMenuState, newMenuState);
|
||||
}
|
||||
|
||||
|
|
|
@ -708,12 +708,12 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
boolean routeFollowingMode = !routePlanningMode && rh.isFollowingMode();
|
||||
boolean routeDialogOpened = MapRouteInfoMenu.isVisible();
|
||||
boolean trackDialogOpened = TrackDetailsMenu.isVisible();
|
||||
boolean showControlsDueToContextMenu = mapActivity.getContextMenu().shouldShowControls();
|
||||
boolean contextMenuOpened = mapActivity.getContextMenu().shouldShowControls();
|
||||
boolean showRouteCalculationControls = routePlanningMode ||
|
||||
((app.accessibilityEnabled() || (System.currentTimeMillis() - touchEvent < TIMEOUT_TO_SHOW_BUTTONS)) && routeFollowingMode);
|
||||
updateMyLocation(rh, routeDialogOpened || trackDialogOpened || !showControlsDueToContextMenu);
|
||||
updateMyLocation(rh, routeDialogOpened || trackDialogOpened || !contextMenuOpened);
|
||||
boolean showButtons = (showRouteCalculationControls || !routeFollowingMode)
|
||||
&& !isInMovingMarkerMode() && !isInGpxDetailsMode() && !isInMeasurementToolMode() && !isInPlanRouteMode() && showControlsDueToContextMenu;
|
||||
&& !isInMovingMarkerMode() && !isInGpxDetailsMode() && !isInMeasurementToolMode() && !isInPlanRouteMode() && contextMenuOpened;
|
||||
//routePlanningBtn.setIconResId(routeFollowingMode ? R.drawable.ic_action_gabout_dark : R.drawable.map_directions);
|
||||
if (rh.isFollowingMode()) {
|
||||
routePlanningBtn.setIconResId(R.drawable.map_start_navigation);
|
||||
|
@ -728,18 +728,18 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
routePlanningBtn.updateVisibility(showButtons);
|
||||
menuControl.updateVisibility(showButtons);
|
||||
|
||||
mapZoomIn.updateVisibility(!routeDialogOpened && showControlsDueToContextMenu);
|
||||
mapZoomOut.updateVisibility(!routeDialogOpened && showControlsDueToContextMenu);
|
||||
mapZoomIn.updateVisibility(!routeDialogOpened && contextMenuOpened);
|
||||
mapZoomOut.updateVisibility(!routeDialogOpened && contextMenuOpened);
|
||||
compassHud.updateVisibility(!routeDialogOpened && !trackDialogOpened && shouldShowCompass()
|
||||
&& !isInMeasurementToolMode() && !isInPlanRouteMode() && showControlsDueToContextMenu);
|
||||
&& !isInMeasurementToolMode() && !isInPlanRouteMode() && contextMenuOpened);
|
||||
|
||||
if (layersHud.setIconResId(settings.getApplicationMode().getMapIconId())) {
|
||||
layersHud.update(app, isNight);
|
||||
}
|
||||
layersHud.updateVisibility(!routeDialogOpened && !trackDialogOpened && !isInMeasurementToolMode() && !isInPlanRouteMode()
|
||||
&& showControlsDueToContextMenu);
|
||||
&& contextMenuOpened);
|
||||
quickSearchHud.updateVisibility(!routeDialogOpened && !trackDialogOpened && !isInMeasurementToolMode() && !isInPlanRouteMode()
|
||||
&& showControlsDueToContextMenu);
|
||||
&& contextMenuOpened);
|
||||
|
||||
if (!routePlanningMode && !routeFollowingMode) {
|
||||
if (mapView.isZooming()) {
|
||||
|
|
Loading…
Reference in a new issue