From a6c0dc2b0817b84188fe1cf749d6c22941157c72 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Wed, 3 Aug 2016 12:10:29 +0300 Subject: [PATCH] Fix direction arrow --- OsmAnd/res/layout/dash_osmo_item.xml | 7 ++++--- OsmAnd/res/layout/favorites_list_item.xml | 2 +- OsmAnd/res/layout/map_context_menu_fragment.xml | 5 +++-- OsmAnd/res/layout/map_marker_item.xml | 2 +- OsmAnd/res/layout/search_history_list_item.xml | 5 +++-- OsmAnd/res/layout/search_list_item.xml | 5 +++-- OsmAnd/res/layout/searchpoi_list.xml | 7 ++++--- OsmAnd/res/values/sizes.xml | 3 ++- .../net/osmand/plus/activities/FavoritesTreeFragment.java | 2 +- .../plus/activities/search/SearchHistoryFragment.java | 2 +- .../osmand/plus/activities/search/SearchPOIActivity.java | 2 +- .../net/osmand/plus/dashboard/DashLocationFragment.java | 2 +- .../src/net/osmand/plus/helpers/MapMarkerDialogHelper.java | 4 ++-- 13 files changed, 27 insertions(+), 21 deletions(-) diff --git a/OsmAnd/res/layout/dash_osmo_item.xml b/OsmAnd/res/layout/dash_osmo_item.xml index 68e7e34a80..b5dd7c5436 100644 --- a/OsmAnd/res/layout/dash_osmo_item.xml +++ b/OsmAnd/res/layout/dash_osmo_item.xml @@ -60,9 +60,10 @@ + android:layout_width="@dimen/directionIconSize" + android:layout_height="@dimen/directionIconSize" + android:layout_marginTop="1sp" + tools:src="@drawable/ic_direction_arrow"/> + android:src="@drawable/ic_direction_arrow"/> 28dp 12dp 10dp - + 14dp + 28dp 4dp 8dp diff --git a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java index 4bdda2bd93..588f408e6a 100644 --- a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java @@ -98,7 +98,7 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment { setAdapter(favouritesAdapter); boolean light = getMyApplication().getSettings().isLightContent(); - arrowImage = ContextCompat.getDrawable(context, R.drawable.ic_destination_arrow_white); + arrowImage = ContextCompat.getDrawable(context, R.drawable.ic_direction_arrow); arrowImage.mutate(); if (light) { arrowImage.setColorFilter(ContextCompat.getColor(context, R.color.color_distance), PorterDuff.Mode.MULTIPLY); diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java index 784f2370b0..987befbe18 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchHistoryFragment.java @@ -258,7 +258,7 @@ public class SearchHistoryFragment extends OsmAndListFragment implements SearchA TextView distanceText = (TextView) row.findViewById(R.id.distance); ImageView direction = (ImageView) row.findViewById(R.id.direction); IconsCache ic = app.getIconsCache(); - direction.setImageDrawable(ic.getIcon(R.drawable.ic_destination_arrow_white, R.color.color_distance)); + direction.setImageDrawable(ic.getIcon(R.drawable.ic_direction_arrow, R.color.color_distance)); String distance = ""; if (location != null) { int dist = (int) (MapUtils.getDistance(location, historyEntry.getLat(), historyEntry.getLon())); diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java index 93a13217e6..5eeef64029 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java @@ -783,7 +783,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa draw = (DirectionDrawable) dd; } else { draw = new DirectionDrawable(SearchPOIActivity.this, 24, 24, - R.drawable.ic_destination_arrow_white, R.color.color_distance); + R.drawable.ic_direction_arrow, R.color.color_distance); direction.setImageDrawable(draw); } net.osmand.Location loc = location; diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashLocationFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashLocationFragment.java index f992b9bae2..3f13b90922 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashLocationFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashLocationFragment.java @@ -127,7 +127,7 @@ public abstract class DashLocationFragment extends DashBaseFragment { if (arrow != null) { boolean newImage = false; if (arrowResId == 0) { - arrowResId = R.drawable.ic_destination_arrow_white; + arrowResId = R.drawable.ic_direction_arrow; } DirectionDrawable dd; if(!(arrow.getDrawable() instanceof DirectionDrawable)) { diff --git a/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java index 7e7e22fcd3..a93c49f9da 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java @@ -488,7 +488,7 @@ public class MapMarkerDialogHelper { Location.distanceBetween(marker.getLatitude(), marker.getLongitude(), loc.getLatitude(), loc.getLongitude(), mes); } boolean newImage = false; - int arrowResId = R.drawable.ic_destination_arrow_white; + int arrowResId = R.drawable.ic_direction_arrow; DirectionDrawable dd; if (!(arrow.getDrawable() instanceof DirectionDrawable)) { newImage = true; @@ -596,7 +596,7 @@ public class MapMarkerDialogHelper { Location.distanceBetween(marker.getLatitude(), marker.getLongitude(), loc.getLatitude(), loc.getLongitude(), mes); } boolean newImage = false; - int arrowResId = R.drawable.ic_destination_arrow_white; + int arrowResId = R.drawable.ic_direction_arrow; DirectionDrawable dd; if (!(arrow.getDrawable() instanceof DirectionDrawable)) { newImage = true;