Update icons
BIN
OsmAnd/res/drawable-hdpi/map_layers_black.png
Executable file
After Width: | Height: | Size: 2.1 KiB |
BIN
OsmAnd/res/drawable-hdpi/map_layers_white.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
OsmAnd/res/drawable-hdpi/widget_layer.png
Executable file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-large/map_layers_black.png
Executable file
After Width: | Height: | Size: 2.1 KiB |
BIN
OsmAnd/res/drawable-large/map_layers_white.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
OsmAnd/res/drawable-large/widget_layer.png
Executable file
After Width: | Height: | Size: 1.4 KiB |
BIN
OsmAnd/res/drawable-xhdpi/map_layers_black.png
Executable file
After Width: | Height: | Size: 2.2 KiB |
BIN
OsmAnd/res/drawable-xhdpi/map_layers_white.png
Normal file
After Width: | Height: | Size: 2 KiB |
|
@ -982,6 +982,7 @@ public class MapActivityActions implements DialogProvider {
|
||||||
mapActivity.getMapLayers().openLayerSelectionDialog(mapView);
|
mapActivity.getMapLayers().openLayerSelectionDialog(mapView);
|
||||||
}
|
}
|
||||||
}).reg();
|
}).reg();
|
||||||
|
|
||||||
// 3-5. Navigation related (directions, mute, cancel navigation)
|
// 3-5. Navigation related (directions, mute, cancel navigation)
|
||||||
boolean muteVisible = routingHelper.getFinalLocation() != null && routingHelper.isFollowingMode();
|
boolean muteVisible = routingHelper.getFinalLocation() != null && routingHelper.isFollowingMode();
|
||||||
if (muteVisible) {
|
if (muteVisible) {
|
||||||
|
@ -1035,6 +1036,13 @@ public class MapActivityActions implements DialogProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 6-9. Default actions (Settings, Search, Favorites)
|
// 6-9. Default actions (Settings, Search, Favorites)
|
||||||
|
optionsMenuHelper.item(R.string.layer_map_appearance).icons(R.drawable.ic_action_settings_dark, R.drawable.ic_action_settings_light)
|
||||||
|
.listen(new OnContextMenuClick() {
|
||||||
|
@Override
|
||||||
|
public void onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) {
|
||||||
|
mapActivity.getMapLayers().getMapInfoLayer().openViewConfigureDialog();
|
||||||
|
}
|
||||||
|
}).reg();
|
||||||
optionsMenuHelper.item(R.string.settings_Button).icons(R.drawable.ic_action_settings2_dark, R.drawable.ic_action_settings2_light)
|
optionsMenuHelper.item(R.string.settings_Button).icons(R.drawable.ic_action_settings2_dark, R.drawable.ic_action_settings2_light)
|
||||||
.listen(new OnContextMenuClick() {
|
.listen(new OnContextMenuClick() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -250,8 +250,7 @@ public class MapActivityLayers {
|
||||||
settings.SHOW_POI_OVER_MAP.set(isChecked);
|
settings.SHOW_POI_OVER_MAP.set(isChecked);
|
||||||
} else if(itemId == R.string.layer_poi_label){
|
} else if(itemId == R.string.layer_poi_label){
|
||||||
settings.SHOW_POI_LABEL.set(isChecked);
|
settings.SHOW_POI_LABEL.set(isChecked);
|
||||||
} else if(itemId == R.string.layer_map_appearance){
|
|
||||||
getMapInfoLayer().openViewConfigureDialog();
|
|
||||||
} else if(itemId == R.string.layer_favorites){
|
} else if(itemId == R.string.layer_favorites){
|
||||||
settings.SHOW_FAVORITES.set(isChecked);
|
settings.SHOW_FAVORITES.set(isChecked);
|
||||||
} else if(itemId == R.string.layer_gpx_layer){
|
} else if(itemId == R.string.layer_gpx_layer){
|
||||||
|
@ -275,8 +274,7 @@ public class MapActivityLayers {
|
||||||
final OsmandSettings settings = getApplication().getSettings();
|
final OsmandSettings settings = getApplication().getSettings();
|
||||||
final ContextMenuAdapter adapter = new ContextMenuAdapter(activity);
|
final ContextMenuAdapter adapter = new ContextMenuAdapter(activity);
|
||||||
// String appMode = " [" + settings.getApplicationMode().toHumanString(view.getApplication()) +"] ";
|
// String appMode = " [" + settings.getApplicationMode().toHumanString(view.getApplication()) +"] ";
|
||||||
adapter.item(R.string.layer_map_appearance).icons(R.drawable.ic_action_settings_dark, R.drawable.ic_action_settings_light).reg();
|
adapter.item(R.string.layer_poi).selected(settings.SHOW_POI_OVER_MAP.get() ? 1 : 0)
|
||||||
adapter.item(R.string.layer_poi).selected(settings.SHOW_POI_OVER_MAP.get() ? 1 : 0)
|
|
||||||
.icons(R.drawable.ic_action_info_dark, R.drawable.ic_action_info_light).reg();
|
.icons(R.drawable.ic_action_info_dark, R.drawable.ic_action_info_light).reg();
|
||||||
adapter.item(R.string.layer_poi_label).selected(settings.SHOW_POI_LABEL.get() ? 1 : 0)
|
adapter.item(R.string.layer_poi_label).selected(settings.SHOW_POI_LABEL.get() ? 1 : 0)
|
||||||
.icons(R.drawable.ic_action_text_dark, R.drawable.ic_action_text_light).reg();
|
.icons(R.drawable.ic_action_text_dark, R.drawable.ic_action_text_light).reg();
|
||||||
|
|
|
@ -202,7 +202,7 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
adapter.item(R.string.layer_map).icons(R.drawable.ic_action_wmap_dark, R.drawable.ic_action_wmap_light)
|
adapter.item(R.string.layer_map).icons(R.drawable.ic_action_globus_dark, R.drawable.ic_action_globus_light)
|
||||||
.listen(listener).position(0).reg();
|
.listen(listener).position(0).reg();
|
||||||
adapter.item(R.string.layer_overlay).selected(overlayLayer.getMap() != null ? 1 : 0).
|
adapter.item(R.string.layer_overlay).selected(overlayLayer.getMap() != null ? 1 : 0).
|
||||||
icons(R.drawable.ic_action_up_dark, R.drawable.ic_action_up_light).listen(listener).position(10).reg();
|
icons(R.drawable.ic_action_up_dark, R.drawable.ic_action_up_light).listen(listener).position(10).reg();
|
||||||
|
|
|
@ -238,8 +238,8 @@ public class MapInfoLayer extends OsmandMapLayer {
|
||||||
backToLocation = mic.createBackToLocation(map);
|
backToLocation = mic.createBackToLocation(map);
|
||||||
mapInfoControls.registerTopWidget(backToLocation, R.drawable.widget_backtolocation, R.string.map_widget_back_to_loc, "back_to_location", MapWidgetRegistry.RIGHT_CONTROL, all, 5);
|
mapInfoControls.registerTopWidget(backToLocation, R.drawable.widget_backtolocation, R.string.map_widget_back_to_loc, "back_to_location", MapWidgetRegistry.RIGHT_CONTROL, all, 5);
|
||||||
|
|
||||||
View globus = createGlobus();
|
View globus = createLayer();
|
||||||
mapInfoControls.registerTopWidget(globus, R.drawable.widget_globus, R.string.menu_layers, "progress", MapWidgetRegistry.RIGHT_CONTROL, none, 15);
|
mapInfoControls.registerTopWidget(globus, R.drawable.widget_layer, R.string.menu_layers, "progress", MapWidgetRegistry.RIGHT_CONTROL, none, 15);
|
||||||
|
|
||||||
topText = mic.createStreetView(app, map, paintText);
|
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.string.map_widget_top_text,
|
||||||
|
@ -771,10 +771,13 @@ public class MapInfoLayer extends OsmandMapLayer {
|
||||||
});
|
});
|
||||||
return fl;
|
return fl;
|
||||||
}
|
}
|
||||||
private View createGlobus(){
|
private View createLayer(){
|
||||||
final Drawable globusDrawable = view.getResources().getDrawable(R.drawable.list_activities_globus);
|
// final Drawable globusDrawable = view.getResources().getDrawable(R.drawable.list_activities_globus);
|
||||||
final Drawable globusDrawableWhite = view.getResources().getDrawable(R.drawable.list_activities_globus_white);
|
// final Drawable globusDrawableWhite = view.getResources().getDrawable(R.drawable.list_activities_globus_white);
|
||||||
ImageView globus = new ImageViewWidget(view.getContext()) {
|
final Drawable layerDrawable = view.getResources().getDrawable(R.drawable.map_layers_black);
|
||||||
|
final Drawable layerDrawableWhite = view.getResources().getDrawable(R.drawable.map_layers_white);
|
||||||
|
|
||||||
|
ImageView layers = new ImageViewWidget(view.getContext()) {
|
||||||
private boolean nightMode;
|
private boolean nightMode;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -782,21 +785,21 @@ public class MapInfoLayer extends OsmandMapLayer {
|
||||||
boolean nightMode = drawSettings == null ? false : drawSettings.isNightMode();
|
boolean nightMode = drawSettings == null ? false : drawSettings.isNightMode();
|
||||||
if(nightMode != this.nightMode) {
|
if(nightMode != this.nightMode) {
|
||||||
this.nightMode = nightMode;
|
this.nightMode = nightMode;
|
||||||
setImageDrawable(nightMode ? globusDrawableWhite : globusDrawable);
|
setImageDrawable(nightMode ? layerDrawableWhite : layerDrawable);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};;
|
};;
|
||||||
globus.setImageDrawable(globusDrawable);
|
layers.setImageDrawable(layerDrawable);
|
||||||
globus.setOnClickListener(new View.OnClickListener() {
|
layers.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
map.getMapLayers().openLayerSelectionDialog(view);
|
map.getMapLayers().openLayerSelectionDialog(view);
|
||||||
//map.getMapLayers().selectMapLayer(view);
|
//map.getMapLayers().selectMapLayer(view);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return globus;
|
return layers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|