Display city local name
This commit is contained in:
parent
d822c78884
commit
70bf6b6aa6
1 changed files with 7 additions and 2 deletions
|
@ -156,7 +156,7 @@ public class SearchCityByNameActivity extends SearchByNameAbstractActivity<City>
|
|||
public String getText(City obj) {
|
||||
LatLon l = obj.getLocation();
|
||||
if (getCurrentFilter().length() > 2 ) {
|
||||
String name = obj.getName(region.getLang());
|
||||
String name = getShortText(obj);
|
||||
if(obj.getClosestCity() != null) {
|
||||
name += " - " + obj.getClosestCity().getName(region.getLang()) ;
|
||||
LatLon loc = obj.getClosestCity().getLocation();
|
||||
|
@ -177,7 +177,12 @@ public class SearchCityByNameActivity extends SearchByNameAbstractActivity<City>
|
|||
|
||||
@Override
|
||||
public String getShortText(City obj) {
|
||||
return obj.getName(region.getLang());
|
||||
String lName = obj.getName(region.getLang());
|
||||
String name = obj.getName();
|
||||
if(!lName.equals(name)) {
|
||||
return lName + " / " + name;
|
||||
}
|
||||
return lName;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue