shields in top bar

This commit is contained in:
Dmitriy Ruban 2019-12-19 11:18:48 +02:00
parent 44e2fe3c72
commit b128fad4ba

View file

@ -34,6 +34,7 @@ import com.jwetherell.openmap.common.UTMPoint;
import net.osmand.AndroidUtils; import net.osmand.AndroidUtils;
import net.osmand.Location; import net.osmand.Location;
import net.osmand.LocationConvert; import net.osmand.LocationConvert;
import net.osmand.binary.BinaryMapIndexReader;
import net.osmand.binary.RouteDataObject; import net.osmand.binary.RouteDataObject;
import net.osmand.data.LatLon; import net.osmand.data.LatLon;
import net.osmand.data.PointDescription; import net.osmand.data.PointDescription;
@ -1055,8 +1056,11 @@ public class MapInfoWidgetsFactory {
"»"); "»");
} }
if (ref != null) { if (ref != null) {
setShield(shieldIcon, assembleShieldString(rt.getShieldColor().value, BinaryMapIndexReader.TagValuePair colorPair = rt.getShieldColor();
rt.getShieldShape().value, BinaryMapIndexReader.TagValuePair shapePair = rt.getShieldShape();
setShield(shieldIcon, assembleShieldString(
colorPair != null ? colorPair.value : null,
shapePair != null ? shapePair.value : null,
ref.length()), ref); ref.length()), ref);
AndroidUiHelper.updateVisibility(shieldIcon, true); AndroidUiHelper.updateVisibility(shieldIcon, true);
}else { }else {