From 967f0db69ed25cc6e43c0d81a42f3caf047fcad4 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 26 Jan 2018 11:07:33 +0200 Subject: [PATCH] Change starting point icon --- .../plus/mapcontextmenu/other/MapRouteInfoMenu.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java index c694d087d3..00baf41ec6 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/other/MapRouteInfoMenu.java @@ -445,16 +445,9 @@ public class MapRouteInfoMenu implements IRouteInformationListener { fromDropDownIcon.setImageDrawable(mapActivity.getMyApplication().getIconsCache().getIcon(R.drawable.ic_action_arrow_drop_down, isLight())); } - @SuppressWarnings("deprecation") public void updateFromIcon(View parentView) { - TargetPointsHelper targets = getTargets(); - ImageView fromIcon = (ImageView) parentView.findViewById(R.id.fromIcon); - if (targets.getPointToStart() == null) { - ApplicationMode appMode = mapActivity.getMyApplication().getSettings().getApplicationMode(); - fromIcon.setImageDrawable(mapActivity.getResources().getDrawable(appMode.getResourceLocationDay())); - } else { - fromIcon.setImageDrawable(mapActivity.getMyApplication().getIconsCache().getIcon(R.drawable.list_startpoint, 0)); - } + ((ImageView) parentView.findViewById(R.id.fromIcon)).setImageDrawable(ContextCompat.getDrawable(mapActivity, + getTargets().getPointToStart() == null ? R.drawable.ic_action_location_color : R.drawable.list_startpoint)); } protected void selectOnScreen(boolean target) {