Fix icons

This commit is contained in:
PavelRatushny 2017-11-20 10:56:23 +02:00
parent 1bd9b7bff9
commit ddf4da4b7d

View file

@ -120,14 +120,15 @@ public class OsmEditsAdapter extends ArrayAdapter<OsmPoint> {
private Drawable getIcon(OsmPoint point) {
if (point.getGroup() == OsmPoint.Group.POI) {
Node node = ((OpenstreetmapPoint) point).getEntity();
int iconResId = 0;
String typeStr = node.getTag(OSMSettings.OSMTagKey.AMENITY);
if (!Algorithms.isEmpty(typeStr)) {
iconResId = RenderingIcons.getBigIconResourceId(OSMSettings.OSMTagKey.AMENITY.getValue() + "_" + typeStr);
}
OpenstreetmapPoint osmPoint = (OpenstreetmapPoint) point;
String type = osmPoint.getType();
String subtype = osmPoint.getSubtype();
int iconResId = RenderingIcons.getBigIconResourceId(type);
if (iconResId == 0) {
iconResId = R.drawable.ic_type_info;
iconResId = RenderingIcons.getBigIconResourceId(type + "_" + subtype);
if (iconResId == 0) {
iconResId = R.drawable.ic_type_info;
}
}
int colorResId = R.color.color_distance;
if (point.getAction() == OsmPoint.Action.CREATE) {