Change title and type strings in transport route controller

This commit is contained in:
PavelRatushny 2017-12-29 11:41:09 +02:00
parent e4341eb787
commit dd2441c024

View file

@ -121,15 +121,7 @@ public class TransportRouteController extends MenuController {
@Override
public String getTypeStr() {
if (transportRoute.refStop != null && !TextUtils.isEmpty(transportRoute.refStop.getName())) {
return transportRoute.refStop.getName();
} else if (transportRoute.stop != null && !TextUtils.isEmpty(transportRoute.stop.getName())) {
return transportRoute.stop.getName();
} else if (!TextUtils.isEmpty(getPointDescription().getTypeName())) {
return getPointDescription().getTypeName();
} else {
return getStopType();
}
return getPointDescription().getName();
}
private String getStopType() {
@ -220,6 +212,19 @@ public class TransportRouteController extends MenuController {
return -1;
}
@Override
public String getNameStr() {
if (transportRoute.refStop != null && !TextUtils.isEmpty(transportRoute.refStop.getName())) {
return transportRoute.refStop.getName();
} else if (transportRoute.stop != null && !TextUtils.isEmpty(transportRoute.stop.getName())) {
return transportRoute.stop.getName();
} else if (!TextUtils.isEmpty(getPointDescription().getTypeName())) {
return getPointDescription().getTypeName();
} else {
return getStopType();
}
}
@Override
public void addPlainMenuItems(String typeStr, PointDescription pointDescription, final LatLon latLon) {
super.addPlainMenuItems(typeStr, pointDescription, latLon);