Change title and type strings in transport route controller
This commit is contained in:
parent
e4341eb787
commit
dd2441c024
1 changed files with 14 additions and 9 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue