De-duplicate priorityOrder
This commit is contained in:
parent
40e55858ca
commit
cfbdde5836
8 changed files with 24 additions and 22 deletions
|
@ -700,7 +700,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
|||
setRecordListener(recordControl, activity);
|
||||
}
|
||||
mapInfoLayer.registerSideWidget(recordControl, R.drawable.ic_action_micro_dark,
|
||||
R.string.map_widget_av_notes, "audionotes", false, 22);
|
||||
R.string.map_widget_av_notes, "audionotes", false, 32);
|
||||
mapInfoLayer.recreateControls();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ public class OsmandDevelopmentPlugin extends OsmandPlugin {
|
|||
if (mapInfoLayer != null && mapInfoLayer.getSideWidget(FPSTextInfoWidget.class) == null) {
|
||||
FPSTextInfoWidget fps = new FPSTextInfoWidget(mv, activity);
|
||||
mapInfoLayer.registerSideWidget(fps, R.drawable.ic_action_fps,
|
||||
R.string.map_widget_fps_info, "fps", false, 30);
|
||||
R.string.map_widget_fps_info, "fps", false, 50);
|
||||
mapInfoLayer.recreateControls();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ public class DistanceCalculatorPlugin extends OsmandPlugin {
|
|||
if (mapInfoLayer != null ) {
|
||||
distanceControl = createDistanceControl(activity);
|
||||
mapInfoLayer.registerSideWidget(distanceControl,
|
||||
R.drawable.ic_action_ruler, R.string.map_widget_distancemeasurement, "distance.measurement", false, 21);
|
||||
R.drawable.ic_action_ruler, R.string.map_widget_distancemeasurement, "distance.measurement", false, 35);
|
||||
mapInfoLayer.recreateControls();
|
||||
updateText();
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
|
|||
monitoringControl = createMonitoringControl(activity);
|
||||
|
||||
layer.registerSideWidget(monitoringControl,
|
||||
R.drawable.ic_action_play_dark, R.string.map_widget_monitoring, "monitoring", false, 18);
|
||||
R.drawable.ic_action_play_dark, R.string.map_widget_monitoring, "monitoring", false, 30);
|
||||
layer.recreateControls();
|
||||
}
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ public class OsMoPlugin extends OsmandPlugin implements OsMoReactor {
|
|||
if (layer != null) {
|
||||
osmoControl = createOsMoControl(activity);
|
||||
layer.registerSideWidget(osmoControl, R.drawable.ic_osmo_dark, R.string.osmo_control, "osmo_control",
|
||||
false, 18);
|
||||
false, 31);
|
||||
layer.recreateControls();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -207,7 +207,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
|||
if (mapInfoLayer != null) {
|
||||
parkingPlaceControl = createParkingPlaceInfoControl(activity);
|
||||
mapInfoLayer.registerSideWidget(parkingPlaceControl,
|
||||
R.drawable.ic_action_parking_dark, R.string.map_widget_parking, "parking", false, 8);
|
||||
R.drawable.ic_action_parking_dark, R.string.map_widget_parking, "parking", false, 10);
|
||||
mapInfoLayer.recreateControls();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -195,7 +195,7 @@ public class RoutePointsPlugin extends OsmandPlugin {
|
|||
if (mapInfoLayer != null) {
|
||||
routeStepsControl = createRouteStepsInfoControl(activity);
|
||||
mapInfoLayer.registerSideWidget(routeStepsControl,
|
||||
R.drawable.ic_action_signpost_dark, R.string.map_widget_route_points, "route_steps", false, 8);
|
||||
R.drawable.ic_action_signpost_dark, R.string.map_widget_route_points, "route_steps", false, 12);
|
||||
mapInfoLayer.recreateControls();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,42 +118,44 @@ public class MapInfoLayer extends OsmandMapLayer {
|
|||
NextTurnInfoWidget bigInfoControl = ric.createNextInfoControl(map, app, false);
|
||||
registerSideWidget(bigInfoControl, R.drawable.ic_action_next_turn, R.string.map_widget_next_turn, "next_turn", true, 5);
|
||||
NextTurnInfoWidget smallInfoControl = ric.createNextInfoControl(map, app, true);
|
||||
registerSideWidget(smallInfoControl, R.drawable.ic_action_next_turn, R.string.map_widget_next_turn_small, "next_turn_small", true, 10);
|
||||
registerSideWidget(smallInfoControl, R.drawable.ic_action_next_turn, R.string.map_widget_next_turn_small, "next_turn_small", true, 6);
|
||||
NextTurnInfoWidget nextNextInfoControl = ric.createNextNextInfoControl(map, app, true);
|
||||
registerSideWidget(nextNextInfoControl, R.drawable.ic_action_next_turn, R.string.map_widget_next_next_turn, "next_next_turn",true, 15);
|
||||
registerSideWidget(nextNextInfoControl, R.drawable.ic_action_next_turn, R.string.map_widget_next_next_turn, "next_next_turn",true, 7);
|
||||
|
||||
// register right stack
|
||||
// priorityOrder: 10s navigation-related, 20s position-related, 30s recording- and other plugin-related, 40s general device information, 50s debugging-purpose
|
||||
TextInfoWidget intermediateDist = ric.createIntermediateDistanceControl(map);
|
||||
registerSideWidget(intermediateDist, R.drawable.ic_action_intermediate, R.string.map_widget_intermediate_distance, "intermediate_distance", false, 3);
|
||||
registerSideWidget(intermediateDist, R.drawable.ic_action_intermediate, R.string.map_widget_intermediate_distance, "intermediate_distance", false, 13);
|
||||
TextInfoWidget dist = ric.createDistanceControl(map);
|
||||
registerSideWidget(dist, R.drawable.ic_action_target, R.string.map_widget_distance, "distance", false, 5);
|
||||
registerSideWidget(dist, R.drawable.ic_action_target, R.string.map_widget_distance, "distance", false, 14);
|
||||
TextInfoWidget time = ric.createTimeControl(map);
|
||||
registerSideWidget(time, new TimeControlWidgetState(app), "time", false, 10);
|
||||
registerSideWidget(time, new TimeControlWidgetState(app), "time", false, 15);
|
||||
|
||||
if (settings.USE_MAP_MARKERS.get()) {
|
||||
TextInfoWidget marker = mwf.createMapMarkerControl(map, true);
|
||||
registerSideWidget(marker, R.drawable.ic_action_flag_dark, R.string.map_marker_1st, "map_marker_1st", false, 12);
|
||||
registerSideWidget(marker, R.drawable.ic_action_flag_dark, R.string.map_marker_1st, "map_marker_1st", false, 16);
|
||||
TextInfoWidget bearing = ric.createBearingControl(map);
|
||||
registerSideWidget(bearing, new BearingWidgetState(app), "bearing", false, 13);
|
||||
registerSideWidget(bearing, new BearingWidgetState(app), "bearing", false, 17);
|
||||
TextInfoWidget marker2nd = mwf.createMapMarkerControl(map, false);
|
||||
registerSideWidget(marker2nd, R.drawable.ic_action_flag_dark, R.string.map_marker_2nd, "map_marker_2nd", false, 14);
|
||||
registerSideWidget(marker2nd, R.drawable.ic_action_flag_dark, R.string.map_marker_2nd, "map_marker_2nd", false, 18);
|
||||
} else {
|
||||
TextInfoWidget bearing = ric.createBearingControl(map);
|
||||
registerSideWidget(bearing, new BearingWidgetState(app), "bearing", false, 13);
|
||||
registerSideWidget(bearing, new BearingWidgetState(app), "bearing", false, 17);
|
||||
}
|
||||
|
||||
TextInfoWidget speed = ric.createSpeedControl(map);
|
||||
registerSideWidget(speed, R.drawable.ic_action_speed, R.string.map_widget_speed, "speed", false, 15);
|
||||
registerSideWidget(speed, R.drawable.ic_action_speed, R.string.map_widget_speed, "speed", false, 20);
|
||||
TextInfoWidget maxspeed = ric.createMaxSpeedControl(map);
|
||||
registerSideWidget(maxspeed, R.drawable.ic_action_speed_limit, R.string.map_widget_max_speed, "max_speed", false, 18);
|
||||
registerSideWidget(maxspeed, R.drawable.ic_action_speed_limit, R.string.map_widget_max_speed, "max_speed", false, 21);
|
||||
TextInfoWidget alt = mic.createAltitudeControl(map);
|
||||
registerSideWidget(alt, R.drawable.ic_action_altitude, R.string.map_widget_altitude, "altitude", false, 20);
|
||||
registerSideWidget(alt, R.drawable.ic_action_altitude, R.string.map_widget_altitude, "altitude", false, 23);
|
||||
TextInfoWidget gpsInfo = mic.createGPSInfoControl(map);
|
||||
registerSideWidget(gpsInfo, R.drawable.ic_action_gps_info, R.string.map_widget_gps_info, "gps_info", false, 23);
|
||||
|
||||
registerSideWidget(gpsInfo, R.drawable.ic_action_gps_info, R.string.map_widget_gps_info, "gps_info", false,40);
|
||||
TextInfoWidget plainTime = ric.createPlainTimeControl(map);
|
||||
registerSideWidget(plainTime, R.drawable.ic_action_time, R.string.map_widget_plain_time, "plain_time", false, 25);
|
||||
registerSideWidget(plainTime, R.drawable.ic_action_time, R.string.map_widget_plain_time, "plain_time", false, 41);
|
||||
TextInfoWidget battery = ric.createBatteryControl(map);
|
||||
registerSideWidget(battery, R.drawable.ic_action_battery, R.string.map_widget_battery, "battery", false, 26);
|
||||
registerSideWidget(battery, R.drawable.ic_action_battery, R.string.map_widget_battery, "battery", false, 42);
|
||||
}
|
||||
|
||||
public void recreateControls() {
|
||||
|
|
Loading…
Reference in a new issue