added two methods
This commit is contained in:
parent
77629fe6dd
commit
ab4b28fd43
1 changed files with 21 additions and 0 deletions
|
@ -229,6 +229,27 @@ public class SampleApplication extends Application {
|
|||
keyName.replace('_', ' '));
|
||||
|
||||
}
|
||||
@Override
|
||||
public String getSynonyms(AbstractPoiType type) {
|
||||
AbstractPoiType baseLangType = type.getBaseLangType();
|
||||
if (baseLangType != null) {
|
||||
return getSynonyms(baseLangType);
|
||||
}
|
||||
return getSynonyms(type.getIconKeyName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSynonyms(String keyName) {
|
||||
try {
|
||||
Field f = R.string.class.getField("synonyms_poi_" + keyName);
|
||||
if (f != null) {
|
||||
Integer in = (Integer) f.get(null);
|
||||
return getString(in);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue