Fixed app mode icons for large devices
BIN
OsmAnd/res/drawable-hdpi/map_action_aircraft.png
Normal file
After Width: | Height: | Size: 412 B |
BIN
OsmAnd/res/drawable-hdpi/map_action_bicycle_dark.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_action_bus_dark.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_action_car_dark.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_action_motorcycle_dark.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_action_pedestrian_dark.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_action_sail_boat_dark.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_action_train.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_action_trekking_dark.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_action_truck_dark.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_world_globe_dark.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_action_aircraft.png
Normal file
After Width: | Height: | Size: 450 B |
BIN
OsmAnd/res/drawable-large-hdpi/map_action_bicycle_dark.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_action_bus_dark.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_action_car_dark.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_action_motorcycle_dark.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_action_pedestrian_dark.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_action_sail_boat_dark.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_action_train.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_action_trekking_dark.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_action_truck_dark.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-large-hdpi/map_world_globe_dark.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_action_aircraft.png
Normal file
After Width: | Height: | Size: 672 B |
BIN
OsmAnd/res/drawable-large-xhdpi/map_action_bicycle_dark.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_action_bus_dark.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_action_car_dark.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_action_motorcycle_dark.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_action_pedestrian_dark.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_action_sail_boat_dark.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_action_train.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_action_trekking_dark.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_action_truck_dark.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-large-xhdpi/map_world_globe_dark.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
OsmAnd/res/drawable-large/map_action_aircraft.png
Normal file
After Width: | Height: | Size: 412 B |
BIN
OsmAnd/res/drawable-large/map_action_bicycle_dark.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-large/map_action_bus_dark.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-large/map_action_car_dark.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-large/map_action_motorcycle_dark.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-large/map_action_pedestrian_dark.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-large/map_action_sail_boat_dark.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-large/map_action_train.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-large/map_action_trekking_dark.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-large/map_action_truck_dark.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-large/map_world_globe_dark.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-xhdpi/map_action_aircraft.png
Normal file
After Width: | Height: | Size: 450 B |
BIN
OsmAnd/res/drawable-xhdpi/map_action_bicycle_dark.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
OsmAnd/res/drawable-xhdpi/map_action_bus_dark.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-xhdpi/map_action_car_dark.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-xhdpi/map_action_motorcycle_dark.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
OsmAnd/res/drawable-xhdpi/map_action_pedestrian_dark.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-xhdpi/map_action_sail_boat_dark.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-xhdpi/map_action_train.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-xhdpi/map_action_trekking_dark.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
OsmAnd/res/drawable-xhdpi/map_action_truck_dark.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-xhdpi/map_world_globe_dark.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/map_action_aircraft.png
Normal file
After Width: | Height: | Size: 672 B |
BIN
OsmAnd/res/drawable-xxhdpi/map_action_bicycle_dark.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/map_action_bus_dark.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/map_action_car_dark.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/map_action_motorcycle_dark.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/map_action_pedestrian_dark.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/map_action_sail_boat_dark.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/map_action_train.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/map_action_trekking_dark.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/map_action_truck_dark.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-xxhdpi/map_world_globe_dark.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
|
@ -22,40 +22,40 @@ public class ApplicationMode {
|
|||
* 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().
|
||||
icon(R.drawable.ic_browse_map, R.drawable.ic_world_globe_dark).reg();
|
||||
icon(R.drawable.map_world_globe_dark, R.drawable.ic_world_globe_dark).reg();
|
||||
|
||||
public static final ApplicationMode CAR = create(R.string.app_mode_car, "car").speed(15.3f, 35).carLocation().
|
||||
icon(R.drawable.ic_car, R.drawable.ic_action_car_dark).reg();
|
||||
icon(R.drawable.map_action_car_dark, R.drawable.ic_action_car_dark).reg();
|
||||
|
||||
public static final ApplicationMode BICYCLE = create(R.string.app_mode_bicycle, "bicycle").speed(5.5f, 15).arrivalDistance(60).bicycleLocation().
|
||||
icon(R.drawable.ic_bicycle, R.drawable.ic_action_bicycle_dark).reg();
|
||||
icon(R.drawable.map_action_bicycle_dark, R.drawable.ic_action_bicycle_dark).reg();
|
||||
|
||||
public static final ApplicationMode PEDESTRIAN = create(R.string.app_mode_pedestrian, "pedestrian").speed(1.5f, 5).arrivalDistance(45).
|
||||
icon(R.drawable.ic_pedestrian, R.drawable.ic_action_pedestrian_dark).reg();
|
||||
icon(R.drawable.map_action_pedestrian_dark, R.drawable.ic_action_pedestrian_dark).reg();
|
||||
|
||||
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).reg();
|
||||
icon(R.drawable.map_action_aircraft, R.drawable.ic_action_aircraft).reg();
|
||||
|
||||
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.map_action_sail_boat_dark, R.drawable.ic_action_sail_boat_dark).reg();
|
||||
|
||||
public static final ApplicationMode HIKING = create(R.string.app_mode_hiking, "hiking").speed(1.5f, 5).parent(PEDESTRIAN).
|
||||
icon(R.drawable.ic_trekking, R.drawable.ic_action_trekking_dark).reg();
|
||||
icon(R.drawable.map_action_trekking_dark, R.drawable.ic_action_trekking_dark).reg();
|
||||
|
||||
public static final ApplicationMode MOTORCYCLE = create(R.string.app_mode_motorcycle, "motorcycle").speed(15.3f, 40).
|
||||
carLocation().parent(CAR).
|
||||
icon(R.drawable.ic_motorcycle, R.drawable.ic_action_motorcycle_dark).reg();
|
||||
icon(R.drawable.map_action_motorcycle_dark, R.drawable.ic_action_motorcycle_dark).reg();
|
||||
|
||||
public static final ApplicationMode TRUCK = create(R.string.app_mode_truck, "truck").speed(15.3f, 40).
|
||||
carLocation().parent(CAR).
|
||||
icon(R.drawable.ic_truck, R.drawable.ic_action_truck_dark).reg();
|
||||
icon(R.drawable.map_action_truck_dark, R.drawable.ic_action_truck_dark).reg();
|
||||
|
||||
public static final ApplicationMode BUS = create(R.string.app_mode_bus, "bus").speed(15.3f, 40).
|
||||
carLocation().parent(CAR).
|
||||
icon(R.drawable.ic_action_bus2, R.drawable.ic_action_bus_dark).reg();
|
||||
icon(R.drawable.map_action_bus_dark, R.drawable.ic_action_bus_dark).reg();
|
||||
|
||||
public static final ApplicationMode TRAIN = create(R.string.app_mode_train, "train").speed(25f, 40).
|
||||
carLocation().icon(R.drawable.ic_action_train, R.drawable.ic_action_train).reg();
|
||||
carLocation().icon(R.drawable.map_action_train, R.drawable.ic_action_train).reg();
|
||||
|
||||
static {
|
||||
ApplicationMode[] exceptDefault = new ApplicationMode[]{CAR, PEDESTRIAN, BICYCLE, BOAT, AIRCRAFT, BUS, TRAIN};
|
||||
|
@ -110,8 +110,8 @@ public class ApplicationMode {
|
|||
return applicationMode;
|
||||
}
|
||||
|
||||
public ApplicationModeBuilder icon(int bigIcon, int smallIconDark) {
|
||||
applicationMode.iconId = bigIcon;
|
||||
public ApplicationModeBuilder icon(int mapIcon, int smallIconDark) {
|
||||
applicationMode.mapIconId = mapIcon;
|
||||
applicationMode.smallIconDark = smallIconDark;
|
||||
return this;
|
||||
}
|
||||
|
@ -294,8 +294,8 @@ public class ApplicationMode {
|
|||
return stringKey;
|
||||
}
|
||||
|
||||
public int getIconId() {
|
||||
return iconId;
|
||||
public int getMapIconId() {
|
||||
return mapIconId;
|
||||
}
|
||||
|
||||
public int getStringResource() {
|
||||
|
@ -339,7 +339,7 @@ public class ApplicationMode {
|
|||
private final String stringKey;
|
||||
|
||||
private ApplicationMode parent;
|
||||
private int iconId = R.drawable.ic_browse_map;
|
||||
private int mapIconId = R.drawable.ic_browse_map;
|
||||
private int smallIconDark = R.drawable.ic_world_globe_dark;
|
||||
private float defaultSpeed = 10f;
|
||||
private int minDistanceForTurn = 50;
|
||||
|
|
|
@ -243,7 +243,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
|
||||
private void initTopControls() {
|
||||
View configureMap = mapActivity.findViewById(R.id.map_layers_button);
|
||||
layersHud = createHudButton(configureMap, R.drawable.ic_world_globe_dark)
|
||||
layersHud = createHudButton(configureMap, R.drawable.map_world_globe_dark)
|
||||
.setIconColorId(R.color.on_map_icon_color, 0)
|
||||
.setBg(R.drawable.btn_inset_circle_trans, R.drawable.btn_inset_circle_night);
|
||||
controls.add(layersHud);
|
||||
|
@ -727,7 +727,7 @@ public class MapControlsLayer extends OsmandMapLayer {
|
|||
mapZoomOut.updateVisibility(!routeDialogOpened);
|
||||
compassHud.updateVisibility(!routeDialogOpened && !trackDialogOpened && shouldShowCompass());
|
||||
|
||||
if (layersHud.setIconResId(settings.getApplicationMode().getSmallIconDark())) {
|
||||
if (layersHud.setIconResId(settings.getApplicationMode().getMapIconId())) {
|
||||
layersHud.update(app, isNight);
|
||||
}
|
||||
layersHud.updateVisibility(!routeDialogOpened && !trackDialogOpened);
|
||||
|
|