diff --git a/OsmAnd/res/drawable-mdpi/ic_widget_gpx.png b/OsmAnd/res/drawable-mdpi/ic_action_altitude.png
similarity index 60%
rename from OsmAnd/res/drawable-mdpi/ic_widget_gpx.png
rename to OsmAnd/res/drawable-mdpi/ic_action_altitude.png
index 44a32bd8f2..aa795794c8 100644
Binary files a/OsmAnd/res/drawable-mdpi/ic_widget_gpx.png and b/OsmAnd/res/drawable-mdpi/ic_action_altitude.png differ
diff --git a/OsmAnd/res/drawable-mdpi/widget_gps_info.png b/OsmAnd/res/drawable-mdpi/ic_action_gps_info.png
similarity index 100%
rename from OsmAnd/res/drawable-mdpi/widget_gps_info.png
rename to OsmAnd/res/drawable-mdpi/ic_action_gps_info.png
diff --git a/OsmAnd/res/drawable-hdpi/ic_widget_gpx.png b/OsmAnd/res/drawable-mdpi/ic_action_speed.png
similarity index 51%
rename from OsmAnd/res/drawable-hdpi/ic_widget_gpx.png
rename to OsmAnd/res/drawable-mdpi/ic_action_speed.png
index bb4a04413f..a6de19816e 100644
Binary files a/OsmAnd/res/drawable-hdpi/ic_widget_gpx.png and b/OsmAnd/res/drawable-mdpi/ic_action_speed.png differ
diff --git a/OsmAnd/res/drawable-mdpi/ic_action_time.png b/OsmAnd/res/drawable-mdpi/ic_action_time.png
new file mode 100644
index 0000000000..bcb67a5fa3
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/ic_action_time.png differ
diff --git a/OsmAnd/res/drawable-mdpi/ic_action_time_to_distance.png b/OsmAnd/res/drawable-mdpi/ic_action_time_to_distance.png
new file mode 100644
index 0000000000..4d06fe0548
Binary files /dev/null and b/OsmAnd/res/drawable-mdpi/ic_action_time_to_distance.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_altitude.png b/OsmAnd/res/drawable-xhdpi/ic_action_altitude.png
new file mode 100644
index 0000000000..bd013ee05f
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/ic_action_altitude.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/widget_gps_info.png b/OsmAnd/res/drawable-xhdpi/ic_action_gps_info.png
similarity index 100%
rename from OsmAnd/res/drawable-xhdpi/widget_gps_info.png
rename to OsmAnd/res/drawable-xhdpi/ic_action_gps_info.png
diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_speed.png b/OsmAnd/res/drawable-xhdpi/ic_action_speed.png
new file mode 100644
index 0000000000..aa69a709a5
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/ic_action_speed.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_time.png b/OsmAnd/res/drawable-xhdpi/ic_action_time.png
new file mode 100644
index 0000000000..fb2fb48869
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/ic_action_time.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/ic_action_time_to_distance.png b/OsmAnd/res/drawable-xhdpi/ic_action_time_to_distance.png
new file mode 100644
index 0000000000..e829179a1d
Binary files /dev/null and b/OsmAnd/res/drawable-xhdpi/ic_action_time_to_distance.png differ
diff --git a/OsmAnd/res/drawable-xhdpi/ic_widget_gpx.png b/OsmAnd/res/drawable-xhdpi/ic_widget_gpx.png
deleted file mode 100644
index b488bf0bae..0000000000
Binary files a/OsmAnd/res/drawable-xhdpi/ic_widget_gpx.png and /dev/null differ
diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_altitude.png b/OsmAnd/res/drawable-xxhdpi/ic_action_altitude.png
new file mode 100644
index 0000000000..661605292b
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/ic_action_altitude.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/widget_gps_info.png b/OsmAnd/res/drawable-xxhdpi/ic_action_gps_info.png
similarity index 100%
rename from OsmAnd/res/drawable-xxhdpi/widget_gps_info.png
rename to OsmAnd/res/drawable-xxhdpi/ic_action_gps_info.png
diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_speed.png b/OsmAnd/res/drawable-xxhdpi/ic_action_speed.png
new file mode 100644
index 0000000000..8231d72e64
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/ic_action_speed.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_time.png b/OsmAnd/res/drawable-xxhdpi/ic_action_time.png
new file mode 100644
index 0000000000..46925feaf4
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/ic_action_time.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/ic_action_time_to_distance.png b/OsmAnd/res/drawable-xxhdpi/ic_action_time_to_distance.png
new file mode 100644
index 0000000000..d2985f11e1
Binary files /dev/null and b/OsmAnd/res/drawable-xxhdpi/ic_action_time_to_distance.png differ
diff --git a/OsmAnd/res/drawable-xxhdpi/ic_widget_gpx.png b/OsmAnd/res/drawable-xxhdpi/ic_widget_gpx.png
deleted file mode 100644
index 953f4898b2..0000000000
Binary files a/OsmAnd/res/drawable-xxhdpi/ic_widget_gpx.png and /dev/null differ
diff --git a/OsmAnd/res/layout/drawer_list_item.xml b/OsmAnd/res/layout/drawer_list_item.xml
index bda3867a34..e3992f85c0 100644
--- a/OsmAnd/res/layout/drawer_list_item.xml
+++ b/OsmAnd/res/layout/drawer_list_item.xml
@@ -15,7 +15,7 @@
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:layout_gravity="center_vertical"
- tools:src="@drawable/ic_action_info_dark" />
+ tools:src="@drawable/ic_action_gabout_dark" />
+ android:src="@drawable/ic_action_gabout_dark"/>
140dp
78dp
- 127dp
+ 112dp
32dp
48dp
120dp
diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashLocationFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashLocationFragment.java
index a6028a1847..1b7e133e98 100644
--- a/OsmAnd/src/net/osmand/plus/dashboard/DashLocationFragment.java
+++ b/OsmAnd/src/net/osmand/plus/dashboard/DashLocationFragment.java
@@ -134,11 +134,7 @@ public abstract class DashLocationFragment extends DashBaseFragment {
arrowResId = R.drawable.ic_destination_arrow_white;
}
DirectionDrawable dd = (DirectionDrawable) arrow.getDrawable();
- if (paint) {
- dd.setImage(arrowResId, useCenter ? R.color.color_distance : R.color.color_myloc_distance);
- } else {
- dd.setImage(arrowResId, useCenter ? R.color.color_distance : R.color.color_white);
- }
+ dd.setImage(arrowResId, useCenter ? R.color.color_distance : R.color.color_myloc_distance);
if (fromLoc == null || h == null) {
dd.setAngle(0);
} else {
diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java
index d2bf4e708a..a9cff91bb3 100644
--- a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java
+++ b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java
@@ -185,7 +185,7 @@ public class GpxUiHelper {
s = s.replace('_', ' ');
adapter.item(s).selected(multipleChoice ? 0 : -1)
- .iconColor(R.drawable.ic_action_info_dark).reg();
+ .iconColor(R.drawable.ic_action_polygom_dark).reg();
//if there's some selected files - need to mark them as selected
if (selectedGpxList != null) {
diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java
index 358551665e..f99cd6b643 100644
--- a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java
+++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java
@@ -472,7 +472,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
menuItem.setTitleCondensed(getString(R.string.osmo_follow));
}
if (group != null) {
- createMenuItem(menu, GROUP_INFO, R.string.osmo_group_info, R.drawable.ic_action_info_dark,
+ createMenuItem(menu, GROUP_INFO, R.string.osmo_group_info, R.drawable.ic_action_gabout_dark,
MenuItemCompat.SHOW_AS_ACTION_ALWAYS);
}
if ((group != null && !group.isMainGroup()) || (device != null && device.getGroup().isMainGroup())) {
@@ -888,7 +888,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements
}
};
ImageButton info = (ImageButton) v.findViewById(R.id.info);
- info.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_action_info_dark));
+ info.setImageDrawable(app.getIconsCache().getContentIcon(R.drawable.ic_action_gabout_dark));
info.setOnClickListener(click);
warnCreateDesc.setOnClickListener(click);
diff --git a/OsmAnd/src/net/osmand/plus/parkingpoint/DashParkingFragment.java b/OsmAnd/src/net/osmand/plus/parkingpoint/DashParkingFragment.java
index 473ddefe7a..ff3aca7f94 100644
--- a/OsmAnd/src/net/osmand/plus/parkingpoint/DashParkingFragment.java
+++ b/OsmAnd/src/net/osmand/plus/parkingpoint/DashParkingFragment.java
@@ -4,6 +4,7 @@ import android.app.AlertDialog;
import android.content.DialogInterface;
import android.graphics.Color;
import android.graphics.Typeface;
+import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
@@ -11,7 +12,6 @@ import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
-
import net.osmand.data.LatLon;
import net.osmand.data.PointDescription;
import net.osmand.plus.OsmandPlugin;
@@ -19,6 +19,7 @@ import net.osmand.plus.R;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.dashboard.DashLocationFragment;
import net.osmand.plus.helpers.FontCache;
+import net.osmand.plus.views.DirectionDrawable;
import java.util.Calendar;
@@ -114,7 +115,7 @@ public class DashParkingFragment extends DashLocationFragment {
if (loc != null) {
DashLocationView dv = new DashLocationView(direction, (TextView) mainView.findViewById(R.id.distance), position);
dv.paint = false;
- dv.arrowResId = R.drawable.ic_action_start_navigation;
+ dv.arrowResId = R.drawable.ic_action_start_navigation;
distances.add(dv);
}
diff --git a/OsmAnd/src/net/osmand/plus/sherpafy/SherpafyCustomization.java b/OsmAnd/src/net/osmand/plus/sherpafy/SherpafyCustomization.java
index 95d0205b78..52498b9b83 100644
--- a/OsmAnd/src/net/osmand/plus/sherpafy/SherpafyCustomization.java
+++ b/OsmAnd/src/net/osmand/plus/sherpafy/SherpafyCustomization.java
@@ -487,7 +487,7 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
if(layers.getContextMenuLayer().getFirstSelectedObject() instanceof StageFavorite) {
final StageFavorite sf = ((StageFavorite)layers.getContextMenuLayer().getFirstSelectedObject());
if(selectedStage != null) {
- adapter.item(R.string.show_waypoint_information).iconColor(R.drawable.ic_action_info_dark).position(0)
+ adapter.item(R.string.show_waypoint_information).iconColor(R.drawable.ic_action_gabout_dark).position(0)
.listen(new OnContextMenuClick() {
@Override
public boolean onContextMenuClick(ArrayAdapter> adapter, int itemId, int pos, boolean isChecked) {
@@ -561,7 +561,7 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
}).reg();
}
//important info
- adapter.item(R.string.sherpafy_tour_info_txt).iconColor(R.drawable.ic_action_info_dark)
+ adapter.item(R.string.sherpafy_tour_info_txt).iconColor(R.drawable.ic_action_gabout_dark)
.listen(new OnContextMenuClick() {
@Override
public boolean onContextMenuClick(ArrayAdapter> adapter, int itemId, int pos, boolean isChecked) {
diff --git a/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java b/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java
index 23ca77a6b1..f541ac956b 100644
--- a/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java
+++ b/OsmAnd/src/net/osmand/plus/views/DirectionDrawable.java
@@ -33,15 +33,16 @@ public class DirectionDrawable extends Drawable {
IconsCache iconsCache = ((OsmandApplication) ctx.getApplicationContext()).getIconsCache();
arrowImage = iconsCache.getIcon(resourceId, clrId);
this.resourceId = resourceId;
+ onBoundsChange(getBounds());
}
- public void setImage(int resourceId){
+ public void setImage(int resourceId) {
IconsCache iconsCache = ((OsmandApplication) ctx.getApplicationContext()).getIconsCache();
arrowImage = iconsCache.getIcon(resourceId, 0);
this.resourceId = resourceId;
+ onBoundsChange(getBounds());
}
-
-
+
public DirectionDrawable(Context ctx, float width, float height) {
this.ctx = ctx;
this.width = width;
@@ -74,24 +75,50 @@ public class DirectionDrawable extends Drawable {
public void setAngle(float angle) {
this.angle = angle;
}
+
+
+ @Override
+ public int getIntrinsicWidth() {
+ if (arrowImage != null) {
+ return arrowImage.getIntrinsicWidth();
+ }
+ return super.getIntrinsicWidth();
+ }
+
+ @Override
+ public int getIntrinsicHeight() {
+ if (arrowImage != null) {
+ return arrowImage.getIntrinsicHeight();
+ }
+ return super.getIntrinsicHeight();
+ }
+
+ @Override
+ protected void onBoundsChange(Rect bounds) {
+ super.onBoundsChange(bounds);
+ if (arrowImage != null) {
+ Rect r = getBounds();
+ int w = arrowImage.getIntrinsicWidth();
+ int h = arrowImage.getIntrinsicHeight();
+ int dx = r.width() - w;
+ int dy = r.height() - h;
+ arrowImage.setBounds(r.left + dx / 2, r.top + dy / 2, r.right - dx / 2, r.bottom - dy / 2);
+ }
+ }
@Override
public void draw(Canvas canvas) {
+ canvas.save();
if (arrowImage != null) {
- canvas.rotate(angle, canvas.getHeight() / 2, canvas.getWidth() / 2);
- arrowImage.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
+ Rect r = getBounds();
+ canvas.rotate(angle, r.centerX(), r.centerY());
arrowImage.draw(canvas);
- // TODO delete?
-// Bitmap arrow = Bitmap.createBitmap(canvas.getWidth(), canvas.getHeight(), Bitmap.Config.ARGB_8888);
-// Canvas canv = new Canvas(arrow);
-// arrowImage.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
-// arrowImage.draw(canv);
-// canvas.drawBitmap(arrow, null, new Rect(0, 0, arrow.getHeight(), arrow.getWidth()), null);
} else {
- canvas.rotate(angle, canvas.getHeight()/2, canvas.getWidth() / 2);
+ canvas.rotate(angle, canvas.getWidth() / 2, canvas.getHeight() / 2);
Path directionPath = createDirectionPath();
canvas.drawPath(directionPath, paintRouteDirection);
}
+ canvas.restore();
}
@Override
diff --git a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java
index 38004852af..22a301f700 100644
--- a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java
@@ -453,7 +453,7 @@ public class MapControlsLayer extends OsmandMapLayer {
// && (!routeFollowingMode || settings.SHOW_ZOOM_BUTTONS_NAVIGATION.get());
boolean showButtons = routePlanningMode || !routeFollowingMode || (System.currentTimeMillis() - touchEvent < TIMEOUT_TO_SHOW_BUTTONS);
updateMyLocation(rh);
- routePlanningBtn.setIconResId(routeFollowingMode ? R.drawable.ic_action_info_dark : R.drawable.ic_action_gdirections_dark );
+ routePlanningBtn.setIconResId(routeFollowingMode ? R.drawable.ic_action_gabout_dark : R.drawable.ic_action_gdirections_dark );
routePlanningBtn.updateVisibility(showButtons && !routePlanningMode);
menuControl.setIconResId(settings.USE_DASHBOARD_INSTEAD_OF_DRAWER.get() ? R.drawable.ic_dashboard_dark