diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapWidgetRegistry.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapWidgetRegistry.java index d4c085e71d..6965a79d65 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapWidgetRegistry.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapWidgetRegistry.java @@ -419,6 +419,7 @@ public class MapWidgetRegistry { final int[] menuTitleIds = r.getMessageIds(); final int[] menuItemIds = r.getItemIds(); int checkedId = r.getItemId(); + boolean selected = r.visibleCollapsed(mode) || r.visible(mode); if (menuIconIds != null && menuTitleIds != null && menuItemIds != null && menuIconIds.length == menuTitleIds.length && menuIconIds.length == menuItemIds.length) { for (int i = 0; i < menuIconIds.length; i++) { @@ -427,7 +428,7 @@ public class MapWidgetRegistry { int id = menuItemIds[i]; MenuItem menuItem = menu.add(R.id.single_selection_group, id, i, titleId) .setChecked(id == checkedId); - menuItem.setIcon(menuItem.isChecked() + menuItem.setIcon(menuItem.isChecked() && selected ? ic.getIcon(iconId, R.color.osmand_orange) : ic.getThemedIcon(iconId)); } menu.setGroupCheckable(R.id.single_selection_group, true, true); diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java index 166203433f..6f2552221e 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java @@ -260,6 +260,7 @@ public class RouteInfoWidgetsFactory { @Override public boolean updateInfo(DrawSettings drawSettings) { + setIcons(showArrival.get() ? time : timeToGo, showArrival.get() ? timeN : timeToGoN); int time = 0; if (routingHelper != null && routingHelper.isRouteCalculated()) { //boolean followingMode = routingHelper.isFollowingMode(); @@ -621,6 +622,7 @@ public class RouteInfoWidgetsFactory { @Override public boolean updateInfo(DrawSettings drawSettings) { boolean relative = showRelativeBearing.get(); + setIcons(relative ? relativeBearingResId : bearingResId, relative ? relativeBearingNightResId : bearingNightResId); setContentTitle(relative ? R.string.map_widget_bearing : R.string.map_widget_magnetic_bearing); int b = getBearing(relative); if (distChanged(cachedDegrees, b)) { diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/TextInfoWidget.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/TextInfoWidget.java index 9f0d06e64b..d3fdcf1839 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/TextInfoWidget.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/TextInfoWidget.java @@ -84,10 +84,15 @@ public class TextInfoWidget { topImageView.invalidate(); } - public void setIcons(int widgetDayIcon, int widgetNightIcon) { - dayIcon = widgetDayIcon; - nightIcon = widgetNightIcon; - setImageDrawable(!isNight ? dayIcon : nightIcon); + public boolean setIcons(int widgetDayIcon, int widgetNightIcon) { + if (dayIcon != widgetDayIcon || nightIcon != widgetNightIcon) { + dayIcon = widgetDayIcon; + nightIcon = widgetNightIcon; + setImageDrawable(!isNight ? dayIcon : nightIcon); + return true; + } else { + return false; + } } public boolean isNight() { @@ -210,9 +215,4 @@ public class TextInfoWidget { tv.setTextColor(textColor); tv.setTypeface(Typeface.DEFAULT, textBold ? Typeface.BOLD : Typeface.NORMAL); } - - - - - }