Merge pull request #7263 from osmandapp/RoutePreparationFixes

Fix progress text visibility
This commit is contained in:
Alexey 2019-07-16 10:30:39 +03:00 committed by GitHub
commit fd8c3b90ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;