From 5dc376e891bc5e595f57a9b6e6a46d75567a8f58 Mon Sep 17 00:00:00 2001 From: sonora Date: Fri, 12 Feb 2016 16:51:28 +0100 Subject: [PATCH] fix string assignment --- OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java b/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java index f5b2c7bfe9..5bb7c6829e 100644 --- a/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java +++ b/OsmAnd/src/net/osmand/plus/dialogs/RasterMapMenu.java @@ -38,16 +38,19 @@ public class RasterMapMenu { final OsmandSettings.CommonPreference mapTransparencyPreference; final OsmandSettings.CommonPreference mapTypePreference; @StringRes final int mapTypeString; + @StringRes final int mapTypeStringTransparency; if (type == OsmandRasterMapsPlugin.RasterMapType.OVERLAY) { rasterMapLayer = plugin.getOverlayLayer(); mapTransparencyPreference = settings.MAP_OVERLAY_TRANSPARENCY; mapTypePreference = settings.MAP_OVERLAY; mapTypeString = R.string.map_overlay; + mapTypeString = R.string.overlay_transparency; } else if (type == OsmandRasterMapsPlugin.RasterMapType.UNDERLAY){ rasterMapLayer = plugin.getUnderlayLayer(); mapTransparencyPreference = settings.MAP_TRANSPARENCY; mapTypePreference = settings.MAP_UNDERLAY; mapTypeString = R.string.map_underlay; + mapTypeString = R.string.map_transparency; } else { throw new RuntimeException("Unexpected raster map type"); } @@ -97,8 +100,7 @@ public class RasterMapMenu { } }; // android:max="255" in layout is expected - // FIXME: For case of "Overlay menu" string needs to display overlay_transparency, for case of "Underlay menu" string needs to be map_transparency, as this then modifies the base map transparency, of course! - contextMenuAdapter.item(R.string.map_transparency).layout(R.layout.progress_list_item) + contextMenuAdapter.item(mapTypeStringTransparency).layout(R.layout.progress_list_item) .progress(mapTransparencyPreference.get()).listenInteger(integerListener).reg(); contextMenuAdapter.item(mapTypeString).layout(R.layout.two_line_list_item).description(mapTypePreference.get()).reg(); contextMenuAdapter.item(R.string.show_polygons).listen(l).selected(hidePolygonsPref.get() ? 0 : 1).reg();