Update icons
Before Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-hdpi/ic_action_aircraft.png
Normal file
After Width: | Height: | Size: 412 B |
Before Width: | Height: | Size: 898 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 525 B |
Before Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-mdpi/ic_action_aircraft.png
Normal file
After Width: | Height: | Size: 317 B |
Before Width: | Height: | Size: 553 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 412 B |
Before Width: | Height: | Size: 2.2 KiB |
BIN
OsmAnd/res/drawable-xhdpi/ic_action_aircraft.png
Normal file
After Width: | Height: | Size: 450 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 672 B |
BIN
OsmAnd/res/drawable-xxhdpi/ic_action_aircraft.png
Normal file
After Width: | Height: | Size: 672 B |
BIN
OsmAnd/res/drawable-xxhdpi/ic_aircraft.png
Normal file
After Width: | Height: | Size: 919 B |
|
@ -21,7 +21,7 @@ public class ApplicationMode {
|
||||||
* DEFAULT("Browse map"), CAR("Car"), BICYCLE("Bicycle"), PEDESTRIAN("Pedestrian");
|
* DEFAULT("Browse map"), CAR("Car"), BICYCLE("Bicycle"), PEDESTRIAN("Pedestrian");
|
||||||
*/
|
*/
|
||||||
public static final ApplicationMode DEFAULT = create(R.string.app_mode_default, "default").speed(1.5f, 5).arrivalDistance(90).defLocation().
|
public static final ApplicationMode DEFAULT = create(R.string.app_mode_default, "default").speed(1.5f, 5).arrivalDistance(90).defLocation().
|
||||||
icon(R.drawable.ic_browse_map, R.drawable.app_mode_globus_dark).reg();
|
icon(R.drawable.ic_browse_map, R.drawable.ic_world_globe_dark).reg();
|
||||||
|
|
||||||
public static final ApplicationMode CAR = create(R.string.app_mode_car, "car").speed(15.3f, 35).arrivalDistance(90).carLocation().
|
public static final ApplicationMode CAR = create(R.string.app_mode_car, "car").speed(15.3f, 35).arrivalDistance(90).carLocation().
|
||||||
icon(R.drawable.ic_car, R.drawable.ic_action_car_dark).reg();
|
icon(R.drawable.ic_car, R.drawable.ic_action_car_dark).reg();
|
||||||
|
@ -33,7 +33,7 @@ public class ApplicationMode {
|
||||||
icon(R.drawable.ic_pedestrian, R.drawable.ic_action_pedestrian_dark).reg();
|
icon(R.drawable.ic_pedestrian, R.drawable.ic_action_pedestrian_dark).reg();
|
||||||
|
|
||||||
public static final ApplicationMode AIRCRAFT = create(R.string.app_mode_aircraft, "aircraft").speed(40f, 100).carLocation().
|
public static final ApplicationMode AIRCRAFT = create(R.string.app_mode_aircraft, "aircraft").speed(40f, 100).carLocation().
|
||||||
icon(R.drawable.ic_aircraft,R.drawable.ic_action_aircraft_dark).reg();
|
icon(R.drawable.ic_aircraft,R.drawable.ic_action_aircraft).reg();
|
||||||
|
|
||||||
public static final ApplicationMode BOAT = create(R.string.app_mode_boat, "boat").speed(5.5f, 20).carLocation().
|
public static final ApplicationMode BOAT = create(R.string.app_mode_boat, "boat").speed(5.5f, 20).carLocation().
|
||||||
icon(R.drawable.ic_sail_boat, R.drawable.ic_action_sail_boat_dark).reg();
|
icon(R.drawable.ic_sail_boat, R.drawable.ic_action_sail_boat_dark).reg();
|
||||||
|
@ -148,7 +148,7 @@ public class ApplicationMode {
|
||||||
|
|
||||||
private ApplicationMode parent;
|
private ApplicationMode parent;
|
||||||
private int iconId = R.drawable.ic_browse_map;
|
private int iconId = R.drawable.ic_browse_map;
|
||||||
private int smallIconDark = R.drawable.app_mode_globus_dark ;
|
private int smallIconDark = R.drawable.ic_world_globe_dark ;
|
||||||
private float defaultSpeed = 10f;
|
private float defaultSpeed = 10f;
|
||||||
private int minDistanceForTurn = 50;
|
private int minDistanceForTurn = 50;
|
||||||
private int arrivalDistance = 90;
|
private int arrivalDistance = 90;
|
||||||
|
|
|
@ -95,9 +95,11 @@ public class FavoriteImageDrawable extends Drawable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawBitmapInCenter(Canvas canvas, int x, int y, float density) {
|
public void drawBitmapInCenter(Canvas canvas, int x, int y, float density) {
|
||||||
canvas.translate(x, y);
|
int dx = x - getIntrinsicWidth() / 2;
|
||||||
|
int dy = y - getIntrinsicHeight() / 2;
|
||||||
|
canvas.translate(dx, dy);
|
||||||
draw(canvas);
|
draw(canvas);
|
||||||
canvas.translate(-x, -y);
|
canvas.translate(-dx, -dy);
|
||||||
// float bmpRad = 10 * density;
|
// float bmpRad = 10 * density;
|
||||||
// bmpDest.set(x - bmpRad, y - bmpRad, x + bmpRad, y + bmpRad);
|
// bmpDest.set(x - bmpRad, y - bmpRad, x + bmpRad, y + bmpRad);
|
||||||
// canvas.drawCircle(x, density + y, bmpRad + 3 * density, paintOuter);
|
// canvas.drawCircle(x, density + y, bmpRad + 3 * density, paintOuter);
|
||||||
|
|