added ui for description from enName and synonym

This commit is contained in:
Chumva 2018-03-20 19:15:10 +02:00
parent 541138a026
commit 77d8bfb89f

View file

@ -375,10 +375,14 @@ public class QuickSearchListAdapter extends ArrayAdapter<QuickSearchListItem> {
String searchPhrase = searchUICore.getPhrase().getText(true);
SearchPhrase.NameStringMatcher nm = new SearchPhrase.NameStringMatcher(searchPhrase,
CollatorStringMatcher.StringMatcherMode.CHECK_EQUALS_FROM_SPACE);
for (int i = 0; i < synonyms.length; i++) {
if (nm.matches(synonyms[i])) {
desc = listItem.getTypeName() + " (" + synonyms[i] + ")";
for (String syn : synonyms) {
if (nm.matches(abstractPoiType.getEnTranslation())) {
desc = listItem.getTypeName() + " (" + abstractPoiType.getEnTranslation() + ")";
break;
}
if (nm.matches(syn)) {
desc = listItem.getTypeName() + " (" + syn + ")";
break;
}
}
}