diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml
index 1e5b0f01c5..13f5666328 100644
--- a/OsmAnd/res/values-da/strings.xml
+++ b/OsmAnd/res/values-da/strings.xml
@@ -2134,4 +2134,7 @@
Adressen kendes endnu ikke
Eventuelle ikke-gemte ændringer vil gå tabt. Fortsæt?
Sikker?
-
+ Stop simulering af position
+ Simuler ved brug af indspillet GPX eller beregnet rute
+ %1$s downloads tilbage
+
diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml
index bf78a1af6d..d4eb1e7ffe 100644
--- a/OsmAnd/res/values-it/strings.xml
+++ b/OsmAnd/res/values-it/strings.xml
@@ -2102,7 +2102,7 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz
Gallego
Estone
Cebuano
- Colore GPX
+ Colore traccia GPX
Spessore traccia GPX
Rosso traslucido
Arancione traslucido
@@ -2178,4 +2178,7 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz
Conteggio delle linee
Sei sicuro?
Tutte le modifiche non salvate andranno perse. Continuare?
+Arresta la simulazione del percorso
+ Simula utilizzando un GPX registrato o una percorso calcolato
+ %1$s download rimanenti
diff --git a/OsmAnd/src/net/osmand/plus/IconsCache.java b/OsmAnd/src/net/osmand/plus/IconsCache.java
index 3aede0382d..271d5e25e0 100644
--- a/OsmAnd/src/net/osmand/plus/IconsCache.java
+++ b/OsmAnd/src/net/osmand/plus/IconsCache.java
@@ -1,6 +1,8 @@
package net.osmand.plus;
+import android.graphics.Bitmap;
import android.graphics.PorterDuff;
+import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import gnu.trove.map.hash.TLongObjectHashMap;
@@ -13,13 +15,33 @@ public class IconsCache {
public IconsCache(OsmandApplication app) {
this.app = app;
}
-
-
+
+ public Drawable scaleImage(Drawable image, float scaleFactor) {
+ if ((image == null) || !(image instanceof BitmapDrawable)) {
+ return image;
+ }
+ Bitmap b = ((BitmapDrawable)image).getBitmap();
+
+ int sizeX = Math.round(image.getIntrinsicWidth() * scaleFactor);
+ int sizeY = Math.round(image.getIntrinsicHeight() * scaleFactor);
+
+ Bitmap bitmapResized = Bitmap.createScaledBitmap(b, sizeX, sizeY, false);
+ return new BitmapDrawable(app.getResources(), bitmapResized);
+ }
+
private Drawable getDrawable(int resId, int clrId) {
- long hash = ((long)resId << 31l) + clrId;
+ return getDrawable(resId, clrId, 0);
+ }
+
+ private Drawable getDrawable(int resId, int clrId, float scale) {
+ long hash = ((long)resId << 31l) + clrId + (int)(scale * 10000f);
Drawable d = drawable.get(hash);
if(d == null) {
- d = app.getResources().getDrawable(resId).mutate();
+ if (scale > 0) {
+ d = scaleImage(app.getResources().getDrawable(resId).mutate(), scale);
+ } else {
+ d = app.getResources().getDrawable(resId).mutate();
+ }
d.clearColorFilter();
if (clrId != 0) {
d.setColorFilter(app.getResources().getColor(clrId), PorterDuff.Mode.SRC_IN);
@@ -49,12 +71,14 @@ public class IconsCache {
return getDrawable(id, colorId);
}
+ public Drawable getIcon(int id, int colorId, float scale) {
+ return getDrawable(id, colorId, scale);
+ }
public Drawable getContentIcon(int id) {
return getDrawable(id, app.getSettings().isLightContent() ? R.color.icon_color : 0);
}
-
public Drawable getIcon(int id) {
return getDrawable(id, 0);
}
diff --git a/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java b/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java
index 0cc58034ab..e607582ae4 100644
--- a/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java
+++ b/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java
@@ -69,7 +69,6 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity {
pref.setTitle(R.string.simulate_your_location);
updateTitle.run();
pref.setKey("simulate_your_location");
- sim.isRouteAnimating();
pref.setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java
index 3724e1172e..958a907842 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenu.java
@@ -80,7 +80,7 @@ public class MapContextMenu {
typeStr = null;
streetStr = null;
- acquireLeftIconId();
+ acquireLeftIcon();
acquireNameAndType();
acquireStreetName(new LatLon(pointDescription.getLat(), pointDescription.getLon()));
@@ -123,7 +123,7 @@ public class MapContextMenu {
return streetStr;
}
- private void acquireLeftIconId() {
+ private void acquireLeftIcon() {
leftIconId = 0;
if (object != null) {
if (object instanceof Amenity) {
@@ -131,17 +131,14 @@ public class MapContextMenu {
Amenity o = (Amenity) object;
PoiType st = o.getType().getPoiTypeByKeyName(o.getSubType());
if (st != null) {
- if (RenderingIcons.containsSmallIcon(st.getIconKeyName())) {
+ if (RenderingIcons.containsBigIcon(st.getIconKeyName())) {
id = st.getIconKeyName();
- } else if (RenderingIcons.containsSmallIcon(st.getOsmTag() + "_" + st.getOsmValue())) {
+ } else if (RenderingIcons.containsBigIcon(st.getOsmTag() + "_" + st.getOsmValue())) {
id = st.getOsmTag() + "_" + st.getOsmValue();
}
}
if (id != null) {
- Integer resId = RenderingIcons.getResId(id);
- if (resId != null) {
- leftIconId = resId;
- }
+ leftIconId = RenderingIcons.getBigIconResourceId(id);
}
}
}
@@ -292,5 +289,6 @@ public class MapContextMenu {
if (streetStrObj != null) {
streetStr = streetStrObj.toString();
}
+ acquireLeftIcon();
}
}
diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java
index 68efeec01a..2261c75eee 100644
--- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java
+++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java
@@ -34,7 +34,6 @@ import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.mapcontextmenu.sections.MenuController;
import net.osmand.plus.views.AnimateDraggingMapThread;
-import net.osmand.plus.views.OsmandMapTileView;
import org.apache.commons.logging.Log;
@@ -327,7 +326,7 @@ public class MapContextMenuFragment extends Fragment {
iconLayout.setVisibility(View.GONE);
} else {
iconView.setImageDrawable(iconsCache.getIcon(iconId,
- light ? R.color.osmand_orange : R.color.osmand_orange_dark));
+ light ? R.color.osmand_orange : R.color.osmand_orange_dark, 0.75f));
}
setAddressLocation();