From fb55113c38d86181f8b616a3cdc6f323bd52b7b7 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sun, 15 Mar 2015 16:35:17 +0100 Subject: [PATCH] Update icons --- OsmAnd/res/layout/main.xml | 1 + OsmAnd/res/layout/map_hud_widget.xml | 2 -- .../osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java | 4 ++++ .../net/osmand/plus/views/mapwidgets/NextTurnInfoWidget.java | 3 +-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/OsmAnd/res/layout/main.xml b/OsmAnd/res/layout/main.xml index e9838a62bc..59fe2bf38a 100644 --- a/OsmAnd/res/layout/main.xml +++ b/OsmAnd/res/layout/main.xml @@ -22,6 +22,7 @@ android:id="@+id/MapView" android:layout_width="fill_parent" android:layout_height="fill_parent" + android:background="@drawable/btn_flat" android:contentDescription="@string/shared_string_map" android:visibility="gone" /> diff --git a/OsmAnd/res/layout/map_hud_widget.xml b/OsmAnd/res/layout/map_hud_widget.xml index 164da76524..03aba49dd5 100644 --- a/OsmAnd/res/layout/map_hud_widget.xml +++ b/OsmAnd/res/layout/map_hud_widget.xml @@ -40,7 +40,6 @@ android:shadowColor="@color/color_myloc_distance" android:textColor="@color/color_black" android:shadowRadius="10" - android:textStyle="bold" android:textSize="@dimen/map_widget_text_size" android:text="1048" /> diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java index c1b9e1b3e8..5bd245d69e 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java @@ -338,6 +338,10 @@ public class MapInfoWidgetsFactory { RouteDirectionInfo next = routingHelper.getRouteDirections().get(di); type[0] = next.getTurnType(); text = RoutingHelper.formatStreetName(next.getStreetName(), next.getRef(), next.getDestinationName()); + if(next.distance > 0) { + text += " " + OsmAndFormatter.getFormattedDistance(next.distance, map.getMyApplication()); + } + } } } else if(settings.getApplicationMode() != ApplicationMode.DEFAULT && diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/NextTurnInfoWidget.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/NextTurnInfoWidget.java index 85376cfe71..0d94feeab5 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/NextTurnInfoWidget.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/NextTurnInfoWidget.java @@ -43,7 +43,6 @@ public class NextTurnInfoWidget extends TextInfoWidget { setImageDrawable(null, false); setTopImageDrawable(turnDrawable, true); } - updateVisibility(false); } public TurnType getTurnType() { @@ -51,6 +50,7 @@ public class NextTurnInfoWidget extends TextInfoWidget { } public void setTurnType(TurnType turnType) { + updateVisibility(turnType != null); if (turnDrawable.setTurnType(turnType)) { if(horisontalMini) { setImageDrawable(turnDrawable, false); @@ -58,7 +58,6 @@ public class NextTurnInfoWidget extends TextInfoWidget { setTopImageDrawable(turnDrawable, true); } } - updateVisibility(turnType != null); } public void setTurnImminent(int turnImminent, boolean deviatedFromRoute) {