diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java index bff9822ac2..5f27c858f4 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java @@ -829,6 +829,9 @@ public class MeasurementToolFragment extends Fragment { setBgIds(R.drawable.gradient_toolbar, R.drawable.gradient_toolbar, R.drawable.gradient_toolbar, R.drawable.gradient_toolbar); setCloseBtnVisible(false); + if (newGpxLine != null) { + setSaveViewVisible(true); + } setBackBtnIconIds(R.drawable.ic_action_remove_dark, R.drawable.ic_action_remove_dark); setSingleLineTitle(false); } @@ -837,9 +840,6 @@ public class MeasurementToolFragment extends Fragment { public void updateToolbar(MapInfoWidgetsFactory.TopToolbarView view) { super.updateToolbar(view); view.getShadowView().setVisibility(View.GONE); - if (newGpxLine != null) { - view.getSaveView().setVisibility(View.VISIBLE); - } } } } diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java index 4b78628700..97be2765e4 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java @@ -230,6 +230,7 @@ public class MapInfoWidgetsFactory { int refreshBtnIconClrLightId = R.color.icon_color; int refreshBtnIconClrDarkId = 0; boolean refreshBtnVisible = false; + boolean saveViewVisible = false; int titleTextClrLightId = R.color.primary_text_light; int titleTextClrDarkId = R.color.primary_text_dark; @@ -322,6 +323,10 @@ public class MapInfoWidgetsFactory { this.refreshBtnVisible = visible; } + public void setSaveViewVisible(boolean visible) { + this.saveViewVisible = visible; + } + public void setTitleTextClrIds(int titleTextClrLightId, int titleTextClrDarkId) { this.titleTextClrLightId = titleTextClrLightId; this.titleTextClrDarkId = titleTextClrDarkId; @@ -609,6 +614,13 @@ public class MapInfoWidgetsFactory { } else if (refreshButton.getVisibility() == View.VISIBLE) { refreshButton.setVisibility(View.GONE); } + if (controller.saveViewVisible) { + if (saveView.getVisibility() == View.GONE) { + saveView.setVisibility(View.VISIBLE); + } + } else if (saveView.getVisibility() == View.VISIBLE) { + saveView.setVisibility(View.GONE); + } } public void updateColors() {