diff --git a/OsmAnd/res/layout/layers_list_activity_item.xml b/OsmAnd/res/layout/layers_list_activity_item.xml
index e40c4ae2fd..edc2905ea3 100644
--- a/OsmAnd/res/layout/layers_list_activity_item.xml
+++ b/OsmAnd/res/layout/layers_list_activity_item.xml
@@ -5,8 +5,7 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginLeft="5dip"
- android:layout_marginRight="5dip"
- android:background="@color/color_white">
+ android:layout_marginRight="5dip">
+ android:layout_weight="1"/>
@@ -27,7 +26,6 @@
android:id="@+id/check_item"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:button="@drawable/ic_btn_wocheckbox"
android:focusable="false"
android:gravity="center_vertical" />
diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java
index c4e86e7ef5..9047783537 100644
--- a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java
+++ b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java
@@ -244,7 +244,7 @@ public class ContextMenuAdapter {
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
OnContextMenuClick ca = getClickAdapter(position);
if(ca != null) {
- ca.onContextMenuClick((int) getItemId(position), position, isChecked);
+ ca.onContextMenuClick(position, position, isChecked);
}
}
});
diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
index f3a46cc4d4..1bda8b4b8f 100644
--- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
+++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java
@@ -314,6 +314,13 @@ public class MapActivityActions implements DialogProvider {
enhance(dialogBundle,latitude,longitude, name);
mapActivity.showDialog(DIALOG_ADD_WAYPOINT);
}
+
+ public void openViewConfigureDrawer(){
+ if (!mDrawerLayout.isDrawerOpen(mDrawerList)){
+ mDrawerLayout.openDrawer(mDrawerList);
+ }
+ mapActivity.getMapLayers().getMapInfoLayer().openViewConfigureDrawer(mDrawerList);
+ }
private Dialog createAddWaypointDialog(final Bundle args) {
Builder builder = new AlertDialog.Builder(mapActivity);
@@ -763,7 +770,7 @@ public class MapActivityActions implements DialogProvider {
public void onItemClick(AdapterView> parent, View view, int which, long id) {
OnContextMenuClick click = cm.getClickAdapter(which);
if (click != null) {
- if (click.onContextMenuClick(cm.getItemId(which), which, false)){
+ if (click.onContextMenuClick(cm.getItemId(which), which, false)) {
mDrawerLayout.closeDrawer(mDrawerList);
}
} else {
@@ -916,8 +923,8 @@ public class MapActivityActions implements DialogProvider {
.listen(new OnContextMenuClick() {
@Override
public boolean onContextMenuClick(int itemId, int pos, boolean isChecked) {
- mapActivity.getMapLayers().getMapInfoLayer().openViewConfigureDialog();
- return true;
+ mapActivity.getMapLayers().getMapInfoLayer().openViewConfigureDrawer(mDrawerList);
+ return false;
}
}).reg();
diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java
index 4d008fb5cf..3a23c4dbda 100644
--- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java
@@ -477,7 +477,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
recordControl = new TextInfoWidget(activity, 0, mapInfoLayer.getPaintText(), mapInfoLayer.getPaintSubText());
recordControl.setImageDrawable(activity.getResources().getDrawable(R.drawable.monitoring_rec_inactive));
setRecordListener(recordControl, activity);
- mapInfoLayer.getMapInfoControls().registerSideWidget(recordControl, R.drawable.widget_icon_av_inactive,
+ mapInfoLayer.getMapInfoControls().registerSideWidget(recordControl, R.drawable.widget_icon_av_inactive, R.drawable.widget_icon_av_inactive,
R.string.map_widget_av_notes, "audionotes", false, 22);
mapInfoLayer.recreateControls();
}
diff --git a/OsmAnd/src/net/osmand/plus/development/OsmandDevelopmentPlugin.java b/OsmAnd/src/net/osmand/plus/development/OsmandDevelopmentPlugin.java
index 92a7cbd813..04ee209a04 100644
--- a/OsmAnd/src/net/osmand/plus/development/OsmandDevelopmentPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/development/OsmandDevelopmentPlugin.java
@@ -64,7 +64,7 @@ public class OsmandDevelopmentPlugin extends OsmandPlugin {
return true;
}
};
- mapInfoLayer.getMapInfoControls().registerSideWidget(fps, R.drawable.widget_no_icon,
+ mapInfoLayer.getMapInfoControls().registerSideWidget(fps, R.drawable.widget_no_icon, R.drawable.widget_no_icon,
R.string.map_widget_fps_info, "fps", false, 30);
mapInfoLayer.recreateControls();
}
diff --git a/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java b/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java
index 79a05aaf72..1c48480c18 100644
--- a/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/distancecalculator/DistanceCalculatorPlugin.java
@@ -115,7 +115,7 @@ public class DistanceCalculatorPlugin extends OsmandPlugin {
if (mapInfoLayer != null ) {
distanceControl = createDistanceControl(activity, mapInfoLayer.getPaintText(), mapInfoLayer.getPaintSubText());
mapInfoLayer.getMapInfoControls().registerSideWidget(distanceControl,
- R.drawable.widget_distance, R.string.map_widget_distancemeasurement, "distance.measurement", false, 21);
+ R.drawable.widget_distance, R.drawable.widget_distance, R.string.map_widget_distancemeasurement, "distance.measurement", false, 21);
mapInfoLayer.recreateControls();
updateText();
}
diff --git a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java
index 652a7210e4..c8d853f36f 100644
--- a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java
@@ -95,7 +95,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin implements MonitoringIn
monitoringControl = createMonitoringControl(activity, layer.getPaintText(), layer.getPaintSubText());
layer.getMapInfoControls().registerSideWidget(monitoringControl,
- R.drawable.monitoring_rec_big, R.string.map_widget_monitoring, "monitoring", false, 18);
+ R.drawable.monitoring_rec_big, R.drawable.monitoring_rec_big, R.string.map_widget_monitoring, "monitoring", false, 18);
layer.recreateControls();
}
diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java
index 03801fdc3c..b6f38c51c6 100644
--- a/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java
@@ -181,7 +181,7 @@ public class OsMoPlugin extends OsmandPlugin implements MonitoringInfoControlSer
MapInfoLayer layer = activity.getMapLayers().getMapInfoLayer();
osmoControl = createOsMoControl(activity, layer.getPaintText(), layer.getPaintSubText());
layer.getMapInfoControls().registerSideWidget(osmoControl,
- R.drawable.mon_osmo_signal_inactive, R.string.osmo_control, "osmo_control", false, 18);
+ R.drawable.mon_osmo_signal_inactive, R.drawable.mon_osmo_signal_inactive, R.string.osmo_control, "osmo_control", false, 18);
layer.recreateControls();
if(olayer != null) {
diff --git a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java
index 62edd4fdef..fbe6d72d11 100644
--- a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java
@@ -188,7 +188,7 @@ public class ParkingPositionPlugin extends OsmandPlugin {
if (mapInfoLayer != null) {
parkingPlaceControl = createParkingPlaceInfoControl(activity, mapInfoLayer.getPaintText(), mapInfoLayer.getPaintSubText());
mapInfoLayer.getMapInfoControls().registerSideWidget(parkingPlaceControl,
- R.drawable.widget_parking, R.string.map_widget_parking, "parking", false, 8);
+ R.drawable.widget_parking, R.drawable.widget_parking, R.string.map_widget_parking, "parking", false, 8);
mapInfoLayer.recreateControls();
}
}
diff --git a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java
index 421222b8c5..d12a227cd9 100644
--- a/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/routepointsnavigation/RoutePointsPlugin.java
@@ -177,7 +177,7 @@ public class RoutePointsPlugin extends OsmandPlugin {
if (mapInfoLayer != null) {
routeStepsControl = createRouteStepsInfoControl(activity, mapInfoLayer.getPaintText(), mapInfoLayer.getPaintSubText());
mapInfoLayer.getMapInfoControls().registerSideWidget(routeStepsControl,
- R.drawable.widget_signpost, R.string.map_widget_route_points, "route_steps", false, 8);
+ R.drawable.widget_signpost, R.drawable.widget_signpost, R.string.map_widget_route_points, "route_steps", false, 8);
mapInfoLayer.recreateControls();
}
}
diff --git a/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java b/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java
index 8cdcc82aec..d80215e6e1 100644
--- a/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java
+++ b/OsmAnd/src/net/osmand/plus/views/MapInfoLayer.java
@@ -27,8 +27,6 @@ import net.osmand.plus.views.mapwidgets.StackWidgetView;
import net.osmand.plus.views.mapwidgets.TextInfoWidget;
import net.osmand.plus.views.mapwidgets.UpdateableWidget;
import net.osmand.util.Algorithms;
-import android.app.AlertDialog;
-import android.app.AlertDialog.Builder;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
@@ -172,51 +170,51 @@ public class MapInfoLayer extends OsmandMapLayer {
RoutingHelper routingHelper = app.getRoutingHelper();
NextTurnInfoWidget bigInfoControl = ric.createNextInfoControl(routingHelper, app, view.getSettings(), paintText,
paintSubText, false);
- mapInfoControls.registerSideWidget(bigInfoControl, R.drawable.widget_next_turn, R.string.map_widget_next_turn,"next_turn", true, 5);
+ mapInfoControls.registerSideWidget(bigInfoControl, R.drawable.widget_next_turn, R.drawable.widget_next_turn, R.string.map_widget_next_turn,"next_turn", true, 5);
NextTurnInfoWidget smallInfoControl = ric.createNextInfoControl(routingHelper, app, view.getSettings(),
paintSmallText, paintSmallSubText, true);
- mapInfoControls.registerSideWidget(smallInfoControl, R.drawable.widget_next_turn, R.string.map_widget_next_turn_small, "next_turn_small", true,
+ mapInfoControls.registerSideWidget(smallInfoControl, R.drawable.widget_next_turn, R.drawable.widget_next_turn, R.string.map_widget_next_turn_small, "next_turn_small", true,
10);
NextTurnInfoWidget nextNextInfoControl = ric.createNextNextInfoControl(routingHelper, app, view.getSettings(),
paintSmallText, paintSmallSubText, true);
- mapInfoControls.registerSideWidget(nextNextInfoControl, R.drawable.widget_next_turn, R.string.map_widget_next_next_turn, "next_next_turn",true, 15);
+ mapInfoControls.registerSideWidget(nextNextInfoControl, R.drawable.widget_next_turn, R.drawable.widget_next_turn, R.string.map_widget_next_next_turn, "next_next_turn",true, 15);
//MiniMapControl miniMap = ric.createMiniMapControl(routingHelper, view);
//mapInfoControls.registerSideWidget(miniMap, R.drawable.widget_next_turn, R.string.map_widget_mini_route, "mini_route", true, none, none, 20);
// right stack
TextInfoWidget intermediateDist = ric.createIntermediateDistanceControl(map, paintText, paintSubText);
- mapInfoControls.registerSideWidget(intermediateDist, R.drawable.widget_intermediate, R.string.map_widget_intermediate_distance, "intermediate_distance", false, 3);
+ mapInfoControls.registerSideWidget(intermediateDist, R.drawable.widget_intermediate, R.drawable.widget_intermediate, R.string.map_widget_intermediate_distance, "intermediate_distance", false, 3);
TextInfoWidget dist = ric.createDistanceControl(map, paintText, paintSubText);
- mapInfoControls.registerSideWidget(dist, R.drawable.widget_target, R.string.map_widget_distance, "distance", false, 5);
+ mapInfoControls.registerSideWidget(dist, R.drawable.widget_target, R.drawable.widget_target, R.string.map_widget_distance, "distance", false, 5);
TextInfoWidget time = ric.createTimeControl(map, paintText, paintSubText);
- mapInfoControls.registerSideWidget(time, R.drawable.widget_time, R.string.map_widget_time, "time", false, 10);
+ mapInfoControls.registerSideWidget(time, R.drawable.widget_time, R.drawable.widget_time, R.string.map_widget_time, "time", false, 10);
TextInfoWidget speed = ric.createSpeedControl(map, paintText, paintSubText);
- mapInfoControls.registerSideWidget(speed, R.drawable.widget_speed, R.string.map_widget_speed, "speed", false, 15);
+ mapInfoControls.registerSideWidget(speed, R.drawable.widget_speed, R.drawable.widget_speed, R.string.map_widget_speed, "speed", false, 15);
TextInfoWidget gpsInfo = mic.createGPSInfoControl(map, paintText, paintSubText);
- mapInfoControls.registerSideWidget(gpsInfo, R.drawable.widget_gps_info, R.string.map_widget_gps_info, "gps_info", false, 17);
+ mapInfoControls.registerSideWidget(gpsInfo, R.drawable.widget_gps_info, R.drawable.widget_gps_info, R.string.map_widget_gps_info, "gps_info", false, 17);
TextInfoWidget maxspeed = ric.createMaxSpeedControl(map, paintText, paintSubText);
- mapInfoControls.registerSideWidget(maxspeed, R.drawable.widget_max_speed, R.string.map_widget_max_speed, "max_speed", false, 18);
+ mapInfoControls.registerSideWidget(maxspeed, R.drawable.widget_max_speed, R.drawable.widget_max_speed, R.string.map_widget_max_speed, "max_speed", false, 18);
TextInfoWidget alt = mic.createAltitudeControl(map, paintText, paintSubText);
- mapInfoControls.registerSideWidget(alt, R.drawable.widget_altitude, R.string.map_widget_altitude, "altitude", false, 20);
+ mapInfoControls.registerSideWidget(alt, R.drawable.widget_altitude, R.drawable.widget_altitude, R.string.map_widget_altitude, "altitude", false, 20);
TextInfoWidget plainTime = ric.createPlainTimeControl(map, paintText, paintSubText);
- mapInfoControls.registerSideWidget(plainTime, R.drawable.widget_time_to_distance, R.string.map_widget_plain_time, "plain_time", false, 25);
+ mapInfoControls.registerSideWidget(plainTime, R.drawable.widget_time_to_distance, R.drawable.widget_time_to_distance, R.string.map_widget_plain_time, "plain_time", false, 25);
// Top widgets
ImageViewWidget compassView = mic.createCompassView(map);
- mapInfoControls.registerTopWidget(compassView, R.drawable.widget_compass, R.string.map_widget_compass, "compass", MapWidgetRegistry.LEFT_CONTROL, 5);
+ mapInfoControls.registerTopWidget(compassView, R.drawable.widget_compass, R.drawable.widget_compass, R.string.map_widget_compass, "compass", MapWidgetRegistry.LEFT_CONTROL, 5);
View config = createConfiguration();
- mapInfoControls.registerTopWidget(config, R.drawable.widget_config, R.string.map_widget_config, "config", MapWidgetRegistry.RIGHT_CONTROL, 10);
+ mapInfoControls.registerTopWidget(config, R.drawable.widget_config, R.drawable.widget_config, R.string.map_widget_config, "config", MapWidgetRegistry.RIGHT_CONTROL, 10);
// disable monitoring widget
// mapInfoControls.registerTopWidget(monitoringServices.createMonitoringWidget(view, map), R.drawable.widget_monitoring, R.string.map_widget_monitoring_services,
// "monitoring_services", MapWidgetRegistry.LEFT_CONTROL, 12);
- mapInfoControls.registerTopWidget(mic.createLockInfo(map), R.drawable.widget_lock_screen, R.string.bg_service_screen_lock, "bgService",
+ mapInfoControls.registerTopWidget(mic.createLockInfo(map), R.drawable.widget_lock_screen, R.drawable.widget_lock_screen, R.string.bg_service_screen_lock, "bgService",
MapWidgetRegistry.LEFT_CONTROL, 15);
- mapInfoControls.registerTopWidget(createBackToLocation(mic), R.drawable.widget_backtolocation, R.string.map_widget_back_to_loc, "back_to_location", MapWidgetRegistry.RIGHT_CONTROL, 5);
+ mapInfoControls.registerTopWidget(createBackToLocation(mic), R.drawable.widget_backtolocation, R.drawable.widget_backtolocation, R.string.map_widget_back_to_loc, "back_to_location", MapWidgetRegistry.RIGHT_CONTROL, 5);
View globus = createLayer();
- mapInfoControls.registerTopWidget(globus, R.drawable.widget_layer, R.string.menu_layers, "layers", MapWidgetRegistry.RIGHT_CONTROL, 15);
+ mapInfoControls.registerTopWidget(globus, R.drawable.widget_layer, R.drawable.widget_layer, R.string.menu_layers, "layers", MapWidgetRegistry.RIGHT_CONTROL, 15);
topText = mic.createStreetView(app, map, paintText);
- mapInfoControls.registerTopWidget(topText, R.drawable.street_name, R.string.map_widget_top_text,
+ mapInfoControls.registerTopWidget(topText, R.drawable.street_name, R.drawable.street_name, R.string.map_widget_top_text,
"street_name", MapWidgetRegistry.MAIN_CONTROL, 100);
// Register appearance widgets
@@ -324,10 +322,11 @@ public class MapInfoLayer extends OsmandMapLayer {
}
}
- public void openViewConfigureDialog() {
+ public void openViewConfigureDrawer(ListView listView) {
final OsmandSettings settings = view.getSettings();
final ArrayList