Add map configuration button to layers menu
This commit is contained in:
parent
edc11c4e14
commit
c9bec7c3fd
7 changed files with 14 additions and 9 deletions
BIN
OsmAnd/res/drawable-hdpi/list_activities_config.png
Normal file
BIN
OsmAnd/res/drawable-hdpi/list_activities_config.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
BIN
OsmAnd/res/drawable-large/list_activities_config.png
Normal file
BIN
OsmAnd/res/drawable-large/list_activities_config.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
BIN
OsmAnd/res/drawable-mdpi/list_activities_config.png
Normal file
BIN
OsmAnd/res/drawable-mdpi/list_activities_config.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
|
@ -907,14 +907,14 @@
|
|||
<string name="map_widget_distance">Цель</string>
|
||||
<string name="map_widget_altitude">Высота</string>
|
||||
<string name="map_widget_time">Время в пути</string>
|
||||
<string name="map_widget_next_turn">Следующий поворот</string>
|
||||
<string name="map_widget_next_turn_small">Следующий поворот (маленький)</string>
|
||||
<string name="map_widget_next_next_turn">Второй следующий поворот</string>
|
||||
<string name="map_widget_next_turn">След. поворот</string>
|
||||
<string name="map_widget_next_turn_small">След. поворот (мал.)</string>
|
||||
<string name="map_widget_next_next_turn">Второй след. поворот</string>
|
||||
<string name="map_widget_mini_route">Малая карта маршрута</string>
|
||||
<string name="bg_service_screen_lock">Заблокировать/Разблокировать экран</string>
|
||||
<string name="bg_service_screen_unlock">Unlock screen</string>
|
||||
<string name="bg_service_sleep_mode_off">Disable Sleep mode</string>
|
||||
<string name="bg_service_sleep_mode_on">Enable Sleep mode</string>
|
||||
<string name="bg_service_screen_lock">Блокировка экрана</string>
|
||||
<string name="bg_service_screen_unlock">Блокировать экран</string>
|
||||
<string name="bg_service_sleep_mode_off">Отключить спящий режим</string>
|
||||
<string name="bg_service_sleep_mode_on">Включить спящий режим</string>
|
||||
<string name="bg_service_screen_lock_toast">Экран заблокирован</string>
|
||||
<string name="bg_service_interval">Установить интервал просыпания</string>
|
||||
</resources>
|
|
@ -9,6 +9,7 @@
|
|||
1. All your modified/created strings are in the top of the file (to make easier find what's translated).
|
||||
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
||||
-->
|
||||
<string name="layer_map_appearance">Map appearance…</string>
|
||||
<string name="show_lanes">Show lanes</string>
|
||||
<string name="avoid_unpaved">Avoid unpaved roads</string>
|
||||
<string name="avoid_ferries">Avoid ferries</string>
|
||||
|
|
|
@ -241,6 +241,8 @@ public class MapActivityLayers {
|
|||
settings.SHOW_POI_OVER_MAP.set(isChecked);
|
||||
} else if(itemId == R.string.layer_poi_label){
|
||||
settings.SHOW_POI_LABEL.set(isChecked);
|
||||
} else if(itemId == R.string.layer_map_appearance){
|
||||
getMapInfoLayer().openViewConfigureDialog();
|
||||
} else if(itemId == R.string.layer_favorites){
|
||||
settings.SHOW_FAVORITES.set(isChecked);
|
||||
} else if(itemId == R.string.layer_gpx_layer){
|
||||
|
@ -265,6 +267,8 @@ public class MapActivityLayers {
|
|||
public void openLayerSelectionDialog(final OsmandMapTileView mapView){
|
||||
final OsmandSettings settings = getApplication().getSettings();
|
||||
final ContextMenuAdapter adapter = new ContextMenuAdapter(activity);
|
||||
adapter.registerItem(R.string.layer_map_appearance,
|
||||
R.drawable.list_activities_config);
|
||||
adapter.registerSelectedItem(R.string.layer_poi, settings.SHOW_POI_OVER_MAP.get() ? 1 : 0,
|
||||
R.drawable.list_activities_poi);
|
||||
adapter.registerSelectedItem(R.string.layer_poi_label, settings.SHOW_POI_LABEL.get() ? 1 : 0,
|
||||
|
|
|
@ -199,8 +199,8 @@ public class MapInfoLayer extends OsmandMapLayer {
|
|||
NextTurnInfoControl nextNextInfoControl = ric.createNextNextInfoControl(routingHelper, view.getApplication(), view.getSettings(),
|
||||
paintSmallText, paintSmallSubText, true);
|
||||
mapInfoControls.registerSideWidget(nextNextInfoControl, R.drawable.widget_next_turn, R.string.map_widget_next_next_turn, "next_next_turn",true, all, none, 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);
|
||||
//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
|
||||
TextInfoControl dist = ric.createDistanceControl(map, paintText, paintSubText);
|
||||
mapInfoControls.registerSideWidget(dist, R.drawable.info_target, R.string.map_widget_distance, "distance", false, all, none, 5);
|
||||
|
|
Loading…
Reference in a new issue