From 5db40cd60a73ad6b9806bfe9d0b01589df34bd29 Mon Sep 17 00:00:00 2001 From: Chumva Date: Tue, 16 Jul 2019 10:26:40 +0300 Subject: [PATCH] Fix progress text visibility --- .../routepreparationmenu/MapRouteInfoMenuFragment.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenuFragment.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenuFragment.java index 73586f0266..65a6ae6b30 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/MapRouteInfoMenuFragment.java @@ -372,11 +372,10 @@ public class MapRouteInfoMenuFragment extends ContextMenuFragment { } ProgressBar progressBarButton = (ProgressBar) view.findViewById(R.id.progress_bar_button); if (progressBarButton != null) { - int visibility = publicTransportMode ? View.GONE : View.VISIBLE; - if (progressBarButton.getVisibility() != visibility) { - progressBarButton.setVisibility(visibility); + if (progressBarButton.getVisibility() != View.VISIBLE) { + progressBarButton.setVisibility(View.VISIBLE); } - progressBarButton.setProgress(progress); + progressBarButton.setProgress(publicTransportMode ? 0 : progress); } TextViewExProgress textViewExProgress = (TextViewExProgress) view.findViewById(R.id.start_button_descr); textViewExProgress.percent = publicTransportMode ? 0 : progress / 100f;