From 56622214d069db7f97996a72603162aa6fcbaf1d Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Tue, 20 Oct 2015 01:36:15 +0200 Subject: [PATCH] Update icons --- .../plus/audionotes/AudioNotesLayer.java | 28 ++++++++----------- .../osmand/plus/osmedit/OsmEditsLayer.java | 2 +- .../parkingpoint/ParkingPositionLayer.java | 5 +--- 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java index 129058c847..34ba95e6aa 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioNotesLayer.java @@ -1,19 +1,8 @@ package net.osmand.plus.audionotes; -import android.content.DialogInterface; -import android.content.DialogInterface.OnClickListener; -import android.graphics.Bitmap; -import android.graphics.BitmapFactory; -import android.graphics.Canvas; -import android.graphics.Color; -import android.graphics.Paint; -import android.graphics.Paint.Style; -import android.graphics.PointF; -import android.widget.ArrayAdapter; -import android.widget.Toast; +import java.util.List; import net.osmand.access.AccessibleAlertBuilder; -import net.osmand.access.AccessibleToast; import net.osmand.data.DataTileManager; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; @@ -27,9 +16,16 @@ import net.osmand.plus.audionotes.AudioVideoNotesPlugin.Recording; import net.osmand.plus.views.ContextMenuLayer.IContextMenuProvider; import net.osmand.plus.views.OsmandMapLayer; import net.osmand.plus.views.OsmandMapTileView; - -import java.util.ArrayList; -import java.util.List; +import android.content.DialogInterface; +import android.content.DialogInterface.OnClickListener; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.graphics.Canvas; +import android.graphics.Color; +import android.graphics.Paint; +import android.graphics.Paint.Style; +import android.graphics.PointF; +import android.widget.ArrayAdapter; public class AudioNotesLayer extends OsmandMapLayer implements IContextMenuProvider { @@ -101,7 +97,7 @@ public class AudioNotesLayer extends OsmandMapLayer implements IContextMenuProvi b = video; } - canvas.drawBitmap(b, x - b.getWidth() / 2, y - b.getHeight(), paintIcon); + canvas.drawBitmap(b, x - b.getWidth() / 2, y - b.getHeight() / 2, paintIcon); } } } diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsLayer.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsLayer.java index 8aef79f7a9..62c40931d9 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsLayer.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditsLayer.java @@ -88,7 +88,7 @@ public class OsmEditsLayer extends OsmandMapLayer implements ContextMenuLayer.IC } else { b = poi; } - canvas.drawBitmap(b, locationX - b.getWidth() / 2, locationY - b.getHeight(), paintIcon); + canvas.drawBitmap(b, locationX - b.getWidth() / 2, locationY - b.getHeight() / 2, paintIcon); canvas.rotate(view.getRotate(), locationX, locationY); } } diff --git a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionLayer.java b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionLayer.java index f6595fd4db..cd60fa7525 100644 --- a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionLayer.java +++ b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionLayer.java @@ -1,9 +1,7 @@ package net.osmand.plus.parkingpoint; -import java.util.ArrayList; import java.util.List; -import net.osmand.access.AccessibleToast; import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.data.RotatedTileBox; @@ -20,7 +18,6 @@ import android.graphics.Paint; import android.graphics.PointF; import android.util.DisplayMetrics; import android.view.WindowManager; -import android.widget.Toast; /** * Class represents a layer which depicts the position of the parked car @@ -89,7 +86,7 @@ public class ParkingPositionLayer extends OsmandMapLayer implements ContextMenuL double longitude = parkingPoint.getLongitude(); if (isLocationVisible(tb, latitude, longitude)) { int marginX = parkingNoLimitIcon.getWidth() / 2; - int marginY = parkingNoLimitIcon.getHeight(); + int marginY = parkingNoLimitIcon.getHeight() / 2; int locationX = tb.getPixXFromLonNoRot(longitude); int locationY = tb.getPixYFromLatNoRot(latitude); canvas.rotate(-view.getRotate(), locationX, locationY);