Merge pull request #7623 from osmandapp/public_transport_profiles
Fix check for public transport profile
This commit is contained in:
commit
daf2aecb72
4 changed files with 4 additions and 4 deletions
|
@ -567,7 +567,7 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven
|
||||||
: ContextCompat.getColor(this, R.color.wikivoyage_active_light);
|
: ContextCompat.getColor(this, R.color.wikivoyage_active_light);
|
||||||
|
|
||||||
pb.setProgressDrawable(AndroidUtils.createProgressDrawable(bgColor, progressColor));
|
pb.setProgressDrawable(AndroidUtils.createProgressDrawable(bgColor, progressColor));
|
||||||
pb.setIndeterminate(getRoutingHelper().getAppMode() == ApplicationMode.PUBLIC_TRANSPORT);
|
pb.setIndeterminate(getRoutingHelper().isPublicTransportMode());
|
||||||
pb.getIndeterminateDrawable().setColorFilter(progressColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
pb.getIndeterminateDrawable().setColorFilter(progressColor, android.graphics.PorterDuff.Mode.SRC_IN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -950,7 +950,7 @@ public class MapRouteInfoMenu implements IRouteInformationListener, CardListener
|
||||||
View startButton = mainView.findViewById(R.id.start_button);
|
View startButton = mainView.findViewById(R.id.start_button);
|
||||||
TextViewExProgress startButtonText = (TextViewExProgress) mainView.findViewById(R.id.start_button_descr);
|
TextViewExProgress startButtonText = (TextViewExProgress) mainView.findViewById(R.id.start_button_descr);
|
||||||
ProgressBar progressBar = (ProgressBar) mainView.findViewById(R.id.progress_bar_button);
|
ProgressBar progressBar = (ProgressBar) mainView.findViewById(R.id.progress_bar_button);
|
||||||
boolean publicTransportMode = helper.getAppMode() == ApplicationMode.PUBLIC_TRANSPORT;
|
boolean publicTransportMode = helper.isPublicTransportMode();
|
||||||
boolean routeCalculated = isRouteCalculated();
|
boolean routeCalculated = isRouteCalculated();
|
||||||
int iconId = publicTransportMode ? R.drawable.ic_map : R.drawable.ic_action_start_navigation;
|
int iconId = publicTransportMode ? R.drawable.ic_map : R.drawable.ic_action_start_navigation;
|
||||||
int color1;
|
int color1;
|
||||||
|
|
|
@ -357,7 +357,7 @@ public class MapRouteInfoMenuFragment extends ContextMenuFragment {
|
||||||
|
|
||||||
private boolean isPublicTransportMode() {
|
private boolean isPublicTransportMode() {
|
||||||
OsmandApplication app = getMyApplication();
|
OsmandApplication app = getMyApplication();
|
||||||
return app != null && app.getRoutingHelper().getAppMode() == ApplicationMode.PUBLIC_TRANSPORT;
|
return app != null && app.getRoutingHelper().isPublicTransportMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateRouteCalculationProgress(int progress) {
|
public void updateRouteCalculationProgress(int progress) {
|
||||||
|
|
|
@ -1162,7 +1162,7 @@ public class RoutingHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPublicTransportMode() {
|
public boolean isPublicTransportMode() {
|
||||||
return mode == ApplicationMode.PUBLIC_TRANSPORT;
|
return mode.isDerivedRoutingFrom(ApplicationMode.PUBLIC_TRANSPORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isRouteBeingCalculated() {
|
public boolean isRouteBeingCalculated() {
|
||||||
|
|
Loading…
Reference in a new issue