diff --git a/OsmAnd/res/drawable/btn_circle_blue_n.xml b/OsmAnd/res/drawable/btn_circle_blue_n.xml
index 2243a754a2..45b7f8e84e 100644
--- a/OsmAnd/res/drawable/btn_circle_blue_n.xml
+++ b/OsmAnd/res/drawable/btn_circle_blue_n.xml
@@ -7,9 +7,16 @@
android:src="@drawable/bt_round_1_shadow" />
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_circle_blue_p.xml b/OsmAnd/res/drawable/btn_circle_blue_p.xml
index 46fb957c92..117003b7fc 100644
--- a/OsmAnd/res/drawable/btn_circle_blue_p.xml
+++ b/OsmAnd/res/drawable/btn_circle_blue_p.xml
@@ -7,8 +7,15 @@
android:src="@drawable/bt_round_1_shadow" />
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_circle_n.xml b/OsmAnd/res/drawable/btn_circle_n.xml
index 2def8a2b04..1890ac9861 100644
--- a/OsmAnd/res/drawable/btn_circle_n.xml
+++ b/OsmAnd/res/drawable/btn_circle_n.xml
@@ -7,9 +7,16 @@
android:src="@drawable/bt_round_1_shadow" />
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_circle_night.xml b/OsmAnd/res/drawable/btn_circle_night.xml
index 6f013f4999..845a34da23 100644
--- a/OsmAnd/res/drawable/btn_circle_night.xml
+++ b/OsmAnd/res/drawable/btn_circle_night.xml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_circle_night_n.xml b/OsmAnd/res/drawable/btn_circle_night_n.xml
index e7ab894f71..3f95be5536 100644
--- a/OsmAnd/res/drawable/btn_circle_night_n.xml
+++ b/OsmAnd/res/drawable/btn_circle_night_n.xml
@@ -7,9 +7,15 @@
android:src="@drawable/bt_round_1_shadow" />
-
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_circle_night_p.xml b/OsmAnd/res/drawable/btn_circle_night_p.xml
new file mode 100644
index 0000000000..3af02134e6
--- /dev/null
+++ b/OsmAnd/res/drawable/btn_circle_night_p.xml
@@ -0,0 +1,22 @@
+
+
+
+ -
+
+
+ -
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_circle_p.xml b/OsmAnd/res/drawable/btn_circle_p.xml
index 3f1c3cb7c8..b18c1b3d5a 100644
--- a/OsmAnd/res/drawable/btn_circle_p.xml
+++ b/OsmAnd/res/drawable/btn_circle_p.xml
@@ -7,8 +7,15 @@
android:src="@drawable/bt_round_1_shadow" />
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_circle_trans_n.xml b/OsmAnd/res/drawable/btn_circle_trans_n.xml
index 7e879e358a..175fe28af9 100644
--- a/OsmAnd/res/drawable/btn_circle_trans_n.xml
+++ b/OsmAnd/res/drawable/btn_circle_trans_n.xml
@@ -7,9 +7,16 @@
android:src="@drawable/bt_round_1_shadow" />
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_inset_circle_night.xml b/OsmAnd/res/drawable/btn_inset_circle_night.xml
index 6de1228cbf..f76ce0fbae 100644
--- a/OsmAnd/res/drawable/btn_inset_circle_night.xml
+++ b/OsmAnd/res/drawable/btn_inset_circle_night.xml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_inset_circle_trans_n.xml b/OsmAnd/res/drawable/btn_inset_circle_night_p.xml
similarity index 73%
rename from OsmAnd/res/drawable/btn_inset_circle_trans_n.xml
rename to OsmAnd/res/drawable/btn_inset_circle_night_p.xml
index cecddf6c5a..e4ba55870f 100644
--- a/OsmAnd/res/drawable/btn_inset_circle_trans_n.xml
+++ b/OsmAnd/res/drawable/btn_inset_circle_night_p.xml
@@ -1,10 +1,7 @@
-
-
-
+
-
-
+
diff --git a/OsmAnd/res/drawable/btn_inset_circle_trans.xml b/OsmAnd/res/drawable/btn_inset_circle_transparent.xml
similarity index 61%
rename from OsmAnd/res/drawable/btn_inset_circle_trans.xml
rename to OsmAnd/res/drawable/btn_inset_circle_transparent.xml
index 6a410d8e9b..076678237a 100644
--- a/OsmAnd/res/drawable/btn_inset_circle_trans.xml
+++ b/OsmAnd/res/drawable/btn_inset_circle_transparent.xml
@@ -1,5 +1,9 @@
-
+ -
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_round.xml b/OsmAnd/res/drawable/btn_round.xml
index 6b2158c0b7..eb1818b047 100644
--- a/OsmAnd/res/drawable/btn_round.xml
+++ b/OsmAnd/res/drawable/btn_round.xml
@@ -1,15 +1,7 @@
- -
-
-
-
-
- -
-
-
-
-
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_round_n.xml b/OsmAnd/res/drawable/btn_round_n.xml
new file mode 100644
index 0000000000..22baa7cecd
--- /dev/null
+++ b/OsmAnd/res/drawable/btn_round_n.xml
@@ -0,0 +1,13 @@
+
+
+ -
+
+
+ -
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_round_night.xml b/OsmAnd/res/drawable/btn_round_night.xml
index c8fbd85119..b22ef2a21a 100644
--- a/OsmAnd/res/drawable/btn_round_night.xml
+++ b/OsmAnd/res/drawable/btn_round_night.xml
@@ -1,15 +1,6 @@
- -
-
-
-
-
- -
-
-
-
-
-
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_round_night_n.xml b/OsmAnd/res/drawable/btn_round_night_n.xml
new file mode 100644
index 0000000000..bb58448266
--- /dev/null
+++ b/OsmAnd/res/drawable/btn_round_night_n.xml
@@ -0,0 +1,13 @@
+
+
+ -
+
+
+ -
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_round_night_p.xml b/OsmAnd/res/drawable/btn_round_night_p.xml
new file mode 100644
index 0000000000..a1cc6b81e8
--- /dev/null
+++ b/OsmAnd/res/drawable/btn_round_night_p.xml
@@ -0,0 +1,13 @@
+
+
+ -
+
+
+ -
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_round_p.xml b/OsmAnd/res/drawable/btn_round_p.xml
new file mode 100644
index 0000000000..9f8b16b9fd
--- /dev/null
+++ b/OsmAnd/res/drawable/btn_round_p.xml
@@ -0,0 +1,13 @@
+
+
+ -
+
+
+ -
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_round_trans.xml b/OsmAnd/res/drawable/btn_round_trans.xml
index 24682aaa11..53e37d3f40 100644
--- a/OsmAnd/res/drawable/btn_round_trans.xml
+++ b/OsmAnd/res/drawable/btn_round_trans.xml
@@ -1,15 +1,6 @@
- -
-
-
-
-
- -
-
-
-
-
-
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/drawable/btn_round_trans_n.xml b/OsmAnd/res/drawable/btn_round_trans_n.xml
new file mode 100644
index 0000000000..35b0202f3a
--- /dev/null
+++ b/OsmAnd/res/drawable/btn_round_trans_n.xml
@@ -0,0 +1,13 @@
+
+
+ -
+
+
+ -
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/values/colors.xml b/OsmAnd/res/values/colors.xml
index e83139c9b3..3b45295024 100644
--- a/OsmAnd/res/values/colors.xml
+++ b/OsmAnd/res/values/colors.xml
@@ -17,6 +17,7 @@
#333b40
#be39464d
+ #ff8f00
#333333
#ffffff
#bb3f3f3f
diff --git a/OsmAnd/res/values/sizes.xml b/OsmAnd/res/values/sizes.xml
index 5e1c04f1c9..3254bf07e1 100644
--- a/OsmAnd/res/values/sizes.xml
+++ b/OsmAnd/res/values/sizes.xml
@@ -59,7 +59,7 @@
48dp
40dp
- 48dp
+ 50dp
120dp
7dp
52dp
@@ -72,12 +72,13 @@
24dp
32dp
80dp
- 15dp
- 10dp
+ 13dp
+ 8dp
4dp
100dp
2dp
+ 2dp
4dp
3dp
1px
diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java
index 7f461069d7..2965c5bab6 100644
--- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java
@@ -541,11 +541,11 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
private void updateWidgetIcon(final TextInfoWidget recordPlaceControl) {
recordPlaceControl.setImageDrawable(activity.getResources().getDrawable(R.drawable.widget_icon_av_inactive));
if (AV_DEFAULT_ACTION.get() == AV_DEFAULT_ACTION_VIDEO) {
- recordPlaceControl.setImageDrawable(activity.getResources().getDrawable(R.drawable.widget_icon_video));
+ recordPlaceControl.setImageDrawable(R.drawable.widget_icon_video);
} else if (AV_DEFAULT_ACTION.get() == AV_DEFAULT_ACTION_TAKEPICTURE) {
- recordPlaceControl.setImageDrawable(activity.getResources().getDrawable(R.drawable.widget_icon_photo));
+ recordPlaceControl.setImageDrawable(R.drawable.widget_icon_photo);
} else if (AV_DEFAULT_ACTION.get() == AV_DEFAULT_ACTION_AUDIO) {
- recordPlaceControl.setImageDrawable(activity.getResources().getDrawable(R.drawable.widget_icon_audio));
+ recordPlaceControl.setImageDrawable(R.drawable.widget_icon_audio);
}
}
diff --git a/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java b/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java
index 0eb05e07c3..edbc7f240a 100644
--- a/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java
@@ -377,7 +377,7 @@ public class DistanceCalculatorPlugin extends OsmandPlugin {
showDialog(activity);
}
});
- distanceControl.setImageDrawable(app.getResources().getDrawable(R.drawable.widget_distance));
+ distanceControl.setImageDrawable(R.drawable.widget_distance);
return distanceControl;
}
diff --git a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java
index 70188ef40c..dea26fb5e0 100644
--- a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java
@@ -506,7 +506,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
}
});
parkingPlaceControl.setText(null, null);
- parkingPlaceControl.setImageDrawable(map.getResources().getDrawable(R.drawable.widget_parking));
+ parkingPlaceControl.setImageDrawable(R.drawable.widget_parking);
return parkingPlaceControl;
}
diff --git a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java
index 546f43f8ae..dc8ebf3e56 100644
--- a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java
@@ -270,7 +270,7 @@ public class RoutePointsPlugin extends OsmandPlugin {
}
});
routeStepsControl.setText(null, null);
- routeStepsControl.setImageDrawable(map.getResources().getDrawable(R.drawable.widget_signpost));
+ routeStepsControl.setImageDrawable(R.drawable.widget_signpost);
return routeStepsControl;
}
diff --git a/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java b/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java
index 3e2a6fb9e6..58158780a5 100644
--- a/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java
@@ -218,12 +218,12 @@ public class MapInfoLayer extends OsmandMapLayer {
if (!transparent && !nightMode) {
ts.textShadowColor = Color.TRANSPARENT;
}
- ts.textShadowRadius = ts.textShadowColor == 0 ? 0 : 8;
+ ts.textShadowRadius = ts.textShadowColor == 0 ? 0 : 15;
if (transparent) {
ts.boxTop = R.drawable.btn_flat_trans;
ts.rightRes = R.drawable.btn_left_round_transparent;
ts.leftRes = R.drawable.btn_right_round_transparent;
- ts.expand = R.drawable.btn_inset_circle_trans;
+ ts.expand = R.drawable.btn_inset_circle_transparent;
ts.boxFree = R.drawable.btn_round_trans;
} else if (nightMode) {
ts.boxTop = R.drawable.btn_flat_night;
diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java
index 831b53749b..451476f79b 100644
--- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java
+++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapInfoWidgetsFactory.java
@@ -77,7 +77,7 @@ public class MapInfoWidgetsFactory {
}
};
altitudeControl.setText(null, null);
- altitudeControl.setImageDrawable(map.getResources().getDrawable(R.drawable.widget_altitude));
+ altitudeControl.setImageDrawable(R.drawable.widget_altitude);
return altitudeControl;
}
@@ -100,7 +100,7 @@ public class MapInfoWidgetsFactory {
return false;
}
};
- gpsInfoControl.setImageDrawable(app.getResources().getDrawable(R.drawable.widget_gps_info));
+ gpsInfoControl.setImageDrawable(R.drawable.widget_gps_info);
gpsInfoControl.setText(null, null);
gpsInfoControl.setOnClickListener(new View.OnClickListener() {
@Override
diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java
index 9b5348af02..941577ee0d 100644
--- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java
+++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/RouteInfoWidgetsFactory.java
@@ -196,8 +196,8 @@ public class RouteInfoWidgetsFactory {
public TextInfoWidget createTimeControl(final MapActivity map){
final RoutingHelper routingHelper = map.getRoutingHelper();
- final Drawable time = map.getResources().getDrawable(R.drawable.widget_time);
- final Drawable timeToGo = map.getResources().getDrawable(R.drawable.widget_time_to_distance);
+ final int time = R.drawable.widget_time;
+ final int timeToGo = R.drawable.widget_time_to_distance;
final OsmandApplication ctx = map.getMyApplication();
final OsmandPreference showArrival = ctx.getSettings().SHOW_ARRIVAL_TIME_OTHERWISE_EXPECTED_TIME;
final TextInfoWidget leftTimeControl = new TextInfoWidget(map) {
@@ -260,7 +260,6 @@ public class RouteInfoWidgetsFactory {
public TextInfoWidget createPlainTimeControl(final MapActivity map){
- final Drawable timeToGo = map.getResources().getDrawable(R.drawable.widget_time_to_distance);
final OsmandApplication ctx = map.getMyApplication();
final TextInfoWidget plainTimeControl = new TextInfoWidget(map) {
private long cachedLeftTime = 0;
@@ -281,7 +280,7 @@ public class RouteInfoWidgetsFactory {
};
};
plainTimeControl.setText(null, null);
- plainTimeControl.setImageDrawable(timeToGo);
+ plainTimeControl.setImageDrawable(R.drawable.widget_time_to_distance);
return plainTimeControl;
}
@@ -324,7 +323,7 @@ public class RouteInfoWidgetsFactory {
return false;
}
};
- speedControl.setImageDrawable(map.getResources().getDrawable(R.drawable.widget_max_speed));
+ speedControl.setImageDrawable(R.drawable.widget_max_speed);
speedControl.setText(null, null);
return speedControl;
}
@@ -368,7 +367,7 @@ public class RouteInfoWidgetsFactory {
return false;
}
};
- speedControl.setImageDrawable(map.getResources().getDrawable(R.drawable.widget_speed));
+ speedControl.setImageDrawable(R.drawable.widget_speed);
speedControl.setText(null, null);
return speedControl;
}
@@ -379,10 +378,10 @@ public class RouteInfoWidgetsFactory {
private float[] calculations = new float[1];
private int cachedMeters;
- public DistanceToPointInfoControl(MapActivity ma, Drawable d) {
+ public DistanceToPointInfoControl(MapActivity ma, int res) {
super(ma);
this.view = ma.getMapView();
- setImageDrawable(d);
+ setImageDrawable(res);
setText(null, null);
setOnClickListener(new View.OnClickListener() {
@@ -438,8 +437,7 @@ public class RouteInfoWidgetsFactory {
}
public TextInfoWidget createDistanceControl(final MapActivity map) {
- DistanceToPointInfoControl distanceControl = new DistanceToPointInfoControl(map,map.getResources()
- .getDrawable(R.drawable.widget_target)) {
+ DistanceToPointInfoControl distanceControl = new DistanceToPointInfoControl(map,R.drawable.widget_target) {
@Override
public LatLon getPointToNavigate() {
TargetPoint p = map.getPointToNavigate();
@@ -459,8 +457,7 @@ public class RouteInfoWidgetsFactory {
public TextInfoWidget createIntermediateDistanceControl(final MapActivity map) {
final TargetPointsHelper targets = map.getMyApplication().getTargetPointsHelper();
- DistanceToPointInfoControl distanceControl = new DistanceToPointInfoControl(map, map.getResources()
- .getDrawable(R.drawable.widget_intermediate)) {
+ DistanceToPointInfoControl distanceControl = new DistanceToPointInfoControl(map, R.drawable.widget_intermediate) {
@Override
protected void click(OsmandMapTileView view) {
diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/TextInfoWidget.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/TextInfoWidget.java
index 0b9fb5d085..8a879b53bc 100644
--- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/TextInfoWidget.java
+++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/TextInfoWidget.java
@@ -1,8 +1,10 @@
package net.osmand.plus.views.mapwidgets;
+import net.osmand.plus.OsmandApplication;
import net.osmand.plus.R;
import net.osmand.plus.views.OsmandMapLayer.DrawSettings;
import android.app.Activity;
+import android.app.Application;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.view.View;
@@ -22,8 +24,11 @@ public class TextInfoWidget {
private boolean explicitlyVisible;
+ private OsmandApplication app;
+
public TextInfoWidget(Activity activity) {
+ app = (OsmandApplication) activity.getApplication();
view = activity.getLayoutInflater().inflate(R.layout.map_hud_widget, null);
topImageView = (ImageView) view.findViewById(R.id.widget_top_icon);
imageView = (ImageView) view.findViewById(R.id.widget_icon);
@@ -39,6 +44,10 @@ public class TextInfoWidget {
setImageDrawable(imageDrawable, false);
}
+ public void setImageDrawable(int res) {
+ setImageDrawable(app.getIconsCache().getIcon(res, R.color.map_widget_icon_color), false);
+ }
+
public void setImageDrawable(Drawable imageDrawable, boolean gone) {
if(imageDrawable != null) {