make zoom level visible longer

This commit is contained in:
sonora 2015-11-19 01:49:27 +01:00
parent c3e4ccb040
commit 2e64a27a85

View file

@ -95,6 +95,7 @@ public class MapControlsLayer extends OsmandMapLayer {
private MapHudButton mapZoomIn; private MapHudButton mapZoomIn;
private MapHudButton layersHud; private MapHudButton layersHud;
private MapHudButton mapDashControl; private MapHudButton mapDashControl;
private long lastZoom;
public MapControlsLayer(MapActivity activity) { public MapControlsLayer(MapActivity activity) {
this.mapActivity = activity; this.mapActivity = activity;
@ -619,16 +620,20 @@ public class MapControlsLayer extends OsmandMapLayer {
if(routeFollowingMode || routePlanningMode) { if(routeFollowingMode || routePlanningMode) {
mapAppModeShadow.setVisibility(View.GONE); mapAppModeShadow.setVisibility(View.GONE);
} else { } else {
if (mapView.isZooming()) {
lastZoom = System.currentTimeMillis();
}
mapAppModeShadow.setVisibility(View.VISIBLE); mapAppModeShadow.setVisibility(View.VISIBLE);
if (!mapView.isZooming() || !OsmandPlugin.isDevelopment()) { //if (!mapView.isZooming() || !OsmandPlugin.isDevelopment()) {
//if ((System.currentTimeMillis()-lastZoom > 1000) || !OsmandPlugin.isDevelopment()) {
zoomText.setVisibility(View.GONE); zoomText.setVisibility(View.GONE);
appModeIcon.setVisibility(View.VISIBLE); appModeIcon.setVisibility(View.VISIBLE);
appModeIcon.setImageDrawable( appModeIcon.setImageDrawable(
app.getIconsCache().getIcon( app.getIconsCache().getIcon(
settings.getApplicationMode().getSmallIconDark(), !isNight)); settings.getApplicationMode().getSmallIconDark(), !isNight));
} else { } else {
zoomText.setVisibility(View.VISIBLE);
appModeIcon.setVisibility(View.GONE); appModeIcon.setVisibility(View.GONE);
zoomText.setVisibility(View.VISIBLE);
zoomText.setText(getZoomLevel(tileBox)); zoomText.setText(getZoomLevel(tileBox));
} }
} }