diff --git a/OsmAnd/res/layout/searchpoi_list.xml b/OsmAnd/res/layout/searchpoi_list.xml index aacc1cca76..6763b4d6d9 100644 --- a/OsmAnd/res/layout/searchpoi_list.xml +++ b/OsmAnd/res/layout/searchpoi_list.xml @@ -14,6 +14,7 @@ android:id="@+id/poi_icon" android:layout_width="26dp" android:layout_height="26dp" + android:layout_gravity="center_vertical" android:layout_marginRight="@dimen/favorites_icon_right_margin" tools:visiblity="visible"/> diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java index 46e2cfa843..0ab4e7cf0e 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java @@ -86,7 +86,6 @@ import gnu.trove.set.hash.TLongHashSet; */ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompassListener, OsmAndLocationListener { - private static final int COMPASS_REFRESH_MSG_ID = OsmAndConstants.UI_HANDLER_SEARCH + 3; public static final String AMENITY_FILTER = "net.osmand.amenity_filter"; //$NON-NLS-1$ public static final String SEARCH_LAT = SearchActivity.SEARCH_LAT; //$NON-NLS-1$ public static final String SEARCH_LON = SearchActivity.SEARCH_LON; //$NON-NLS-1$ @@ -96,10 +95,6 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa private static final int SHOW_ON_MAP = 1; private static final int FILTER = 2; - private static final int ORIENTATION_0 = 0; - private static final int ORIENTATION_90 = 3; - private static final int ORIENTATION_270 = 1; - private static final int ORIENTATION_180 = 2; private PoiLegacyFilter filter; private AmenityAdapter amenityAdapter; @@ -782,7 +777,9 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa } } DirectionDrawable draw = new DirectionDrawable(SearchPOIActivity.this, width, height, - R.drawable.ic_destination_arrow_white, R.color.color_distance); + R.drawable.ic_destination_arrow_white, + + R.color.color_distance); int screenOrientation = DashLocationFragment.getScreenOrientation(SearchPOIActivity.this); if (loc != null) { float a = heading != null ? heading : 0; @@ -799,8 +796,6 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa icon.setImageResource(RenderingIcons.getBigIconResourceId(st.getKeyName())); } else if (RenderingIcons.containsBigIcon(st.getOsmTag() + "_" + st.getOsmValue())) { icon.setImageResource(RenderingIcons.getBigIconResourceId(st.getOsmTag() + "_" + st.getOsmValue())); - } else if (RenderingIcons.containsBigIcon(st.getOsmTag() + "_" + st.getOsmValue())) { - icon.setImageResource(RenderingIcons.getBigIconResourceId(st.getOsmValue())); } else { icon.setImageDrawable(null); } diff --git a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java index ea410e8d5d..28d52800d7 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/WaypointHelper.java @@ -684,8 +684,6 @@ public class WaypointHelper { } else if (RenderingIcons.containsBigIcon(st.getOsmTag() + "_" + st.getOsmValue())) { return uiCtx.getResources().getDrawable( RenderingIcons.getBigIconResourceId(st.getOsmTag() + "_" + st.getOsmValue())); - } else if (RenderingIcons.containsBigIcon(st.getOsmTag() + "_" + st.getOsmValue())) { - return uiCtx.getResources().getDrawable(RenderingIcons.getBigIconResourceId(st.getOsmValue())); } } return null; diff --git a/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java b/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java index 556ea0b926..3765012bd8 100644 --- a/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java +++ b/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java @@ -50,6 +50,14 @@ public class DirectionDrawable extends Drawable { } public void setOpenedColor(int opened) { + if(arrowImage != null) { + IconsCache iconsCache = ((OsmandApplication) ctx.getApplicationContext()).getIconsCache(); + if (opened == 0) { + arrowImage = iconsCache.getIcon(resourceId, R.color.color_ok); + } else if (opened == -1) { + arrowImage = iconsCache.getIcon(resourceId, R.color.color_warning); + } + } if (opened == 0) { paintRouteDirection.setColor(ctx.getResources().getColor(R.color.color_ok)); } else if (opened == -1) {