Add icons
BIN
OsmAnd/res/drawable-hdpi/widget_contourlines.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-hdpi/widget_day_night_mode.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
OsmAnd/res/drawable-hdpi/widget_fluorescent_routes.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
OsmAnd/res/drawable-hdpi/widget_hmrendered.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
OsmAnd/res/drawable-hdpi/widget_nopolygons.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
OsmAnd/res/drawable-hdpi/widget_position_marker.png
Normal file
After Width: | Height: | Size: 697 B |
BIN
OsmAnd/res/drawable-hdpi/widget_rendering_style.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-hdpi/widget_ruler.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
OsmAnd/res/drawable-hdpi/widget_text_size.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
OsmAnd/res/drawable-hdpi/widget_transparent_skin.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-hdpi/widget_viewing_direction.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-hdpi/widget_virendered.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-large/widget_contourlines.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-large/widget_day_night_mode.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
OsmAnd/res/drawable-large/widget_fluorescent_routes.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
OsmAnd/res/drawable-large/widget_hmrendered.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
OsmAnd/res/drawable-large/widget_nopolygons.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
OsmAnd/res/drawable-large/widget_position_marker.png
Normal file
After Width: | Height: | Size: 697 B |
BIN
OsmAnd/res/drawable-large/widget_rendering_style.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-large/widget_ruler.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
OsmAnd/res/drawable-large/widget_text_size.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
OsmAnd/res/drawable-large/widget_transparent_skin.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
OsmAnd/res/drawable-large/widget_viewing_direction.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-large/widget_virendered.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-mdpi/widget_contourlines.png
Normal file
After Width: | Height: | Size: 932 B |
BIN
OsmAnd/res/drawable-mdpi/widget_day_night_mode.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
OsmAnd/res/drawable-mdpi/widget_fluorescent_routes.png
Normal file
After Width: | Height: | Size: 1,021 B |
BIN
OsmAnd/res/drawable-mdpi/widget_hmrendered.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
OsmAnd/res/drawable-mdpi/widget_nopolygons.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
OsmAnd/res/drawable-mdpi/widget_position_marker.png
Normal file
After Width: | Height: | Size: 556 B |
BIN
OsmAnd/res/drawable-mdpi/widget_rendering_style.png
Normal file
After Width: | Height: | Size: 970 B |
BIN
OsmAnd/res/drawable-mdpi/widget_ruler.png
Normal file
After Width: | Height: | Size: 897 B |
BIN
OsmAnd/res/drawable-mdpi/widget_text_size.png
Normal file
After Width: | Height: | Size: 877 B |
BIN
OsmAnd/res/drawable-mdpi/widget_transparent_skin.png
Normal file
After Width: | Height: | Size: 957 B |
BIN
OsmAnd/res/drawable-mdpi/widget_viewing_direction.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
OsmAnd/res/drawable-mdpi/widget_virendered.png
Normal file
After Width: | Height: | Size: 961 B |
|
@ -64,7 +64,7 @@ public class OsmandExtraSettings extends OsmandPlugin {
|
|||
final MapInfoControls mapInfoControls = mapInfoLayer.getMapInfoControls();
|
||||
|
||||
final OsmandPreference<Float> textSizePref = view.getSettings().MAP_TEXT_SIZE;
|
||||
final MapInfoControlRegInfo textSize = mapInfoControls.registerAppearanceWidget(0, R.string.map_text_size,
|
||||
final MapInfoControlRegInfo textSize = mapInfoControls.registerAppearanceWidget(R.drawable.widget_text_size, R.string.map_text_size,
|
||||
"text_size", textSizePref);
|
||||
textSize.setStateChangeListener(new Runnable() {
|
||||
@Override
|
||||
|
@ -88,7 +88,7 @@ public class OsmandExtraSettings extends OsmandPlugin {
|
|||
b.show();
|
||||
}
|
||||
});
|
||||
final MapInfoControlRegInfo showRuler = mapInfoControls.registerAppearanceWidget(0, R.string.map_widget_show_ruler,
|
||||
final MapInfoControlRegInfo showRuler = mapInfoControls.registerAppearanceWidget(R.drawable.widget_ruler, R.string.map_widget_show_ruler,
|
||||
"showRuler", view.getSettings().SHOW_RULER);
|
||||
showRuler.setStateChangeListener(new Runnable() {
|
||||
@Override
|
||||
|
@ -98,7 +98,7 @@ public class OsmandExtraSettings extends OsmandPlugin {
|
|||
}
|
||||
});
|
||||
|
||||
final MapInfoControlRegInfo transparent = mapInfoControls.registerAppearanceWidget(0, R.string.map_widget_transparent,
|
||||
final MapInfoControlRegInfo transparent = mapInfoControls.registerAppearanceWidget(R.drawable.widget_transparent_skin, R.string.map_widget_transparent,
|
||||
"transparent", view.getSettings().TRANSPARENT_MAP_THEME);
|
||||
transparent.setStateChangeListener(new Runnable() {
|
||||
@Override
|
||||
|
@ -108,7 +108,7 @@ public class OsmandExtraSettings extends OsmandPlugin {
|
|||
}
|
||||
});
|
||||
|
||||
final MapInfoControlRegInfo fluorescent = mapInfoControls.registerAppearanceWidget(0, R.string.map_widget_fluorescent,
|
||||
final MapInfoControlRegInfo fluorescent = mapInfoControls.registerAppearanceWidget(R.drawable.widget_fluorescent_routes, R.string.map_widget_fluorescent,
|
||||
"fluorescent", view.getSettings().FLUORESCENT_OVERLAYS);
|
||||
fluorescent.setStateChangeListener(new Runnable() {
|
||||
@Override
|
||||
|
@ -119,7 +119,7 @@ public class OsmandExtraSettings extends OsmandPlugin {
|
|||
});
|
||||
|
||||
final CommonPreference<Integer> posPref = view.getSettings().POSITION_ON_MAP;
|
||||
final MapInfoControlRegInfo posMap = mapInfoControls.registerAppearanceWidget(0, R.string.position_on_map,
|
||||
final MapInfoControlRegInfo posMap = mapInfoControls.registerAppearanceWidget(R.drawable.widget_position_marker, R.string.position_on_map,
|
||||
"position_on_map", textSizePref);
|
||||
posMap.setStateChangeListener(new Runnable() {
|
||||
@Override
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package net.osmand.plus.views;
|
||||
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
|
@ -250,7 +251,7 @@ public class MapInfoLayer extends OsmandMapLayer {
|
|||
|
||||
|
||||
private void registerAppearanceWidgets() {
|
||||
final MapInfoControlRegInfo vectorRenderer = mapInfoControls.registerAppearanceWidget(0, R.string.map_widget_renderer,
|
||||
final MapInfoControlRegInfo vectorRenderer = mapInfoControls.registerAppearanceWidget(R.drawable.widget_rendering_style, R.string.map_widget_renderer,
|
||||
"renderer", view.getSettings().RENDERER);
|
||||
final OsmandApplication app = view.getApplication();
|
||||
vectorRenderer.setStateChangeListener(new Runnable() {
|
||||
|
@ -289,7 +290,7 @@ public class MapInfoLayer extends OsmandMapLayer {
|
|||
}
|
||||
});
|
||||
|
||||
final MapInfoControlRegInfo dayNight = mapInfoControls.registerAppearanceWidget(0, R.string.map_widget_day_night,
|
||||
final MapInfoControlRegInfo dayNight = mapInfoControls.registerAppearanceWidget(R.drawable.widget_day_night_mode, R.string.map_widget_day_night,
|
||||
"dayNight", view.getSettings().DAYNIGHT_MODE);
|
||||
dayNight.setStateChangeListener(new Runnable() {
|
||||
@Override
|
||||
|
@ -314,7 +315,7 @@ public class MapInfoLayer extends OsmandMapLayer {
|
|||
}
|
||||
});
|
||||
|
||||
final MapInfoControlRegInfo displayViewDirections = mapInfoControls.registerAppearanceWidget(0, R.string.map_widget_view_direction,
|
||||
final MapInfoControlRegInfo displayViewDirections = mapInfoControls.registerAppearanceWidget(R.drawable.widget_viewing_direction, R.string.map_widget_view_direction,
|
||||
"viewDirection", view.getSettings().SHOW_VIEW_ANGLE);
|
||||
displayViewDirections.setStateChangeListener(new Runnable() {
|
||||
@Override
|
||||
|
@ -335,7 +336,13 @@ public class MapInfoLayer extends OsmandMapLayer {
|
|||
String propertyName = SettingsActivity.getStringPropertyName(view.getContext(), p.getAttrName(), p.getName());
|
||||
if(p.isBoolean()) {
|
||||
final CommonPreference<Boolean> pref = view.getApplication().getSettings().getCustomRenderBooleanProperty(p.getAttrName());
|
||||
MapInfoControlRegInfo w = mapInfoControls.registerAppearanceWidget(0, propertyName, "rend_"+p.getAttrName(), pref, categoryName);
|
||||
int icon = 0;
|
||||
try {
|
||||
Field f = R.drawable.class.getField("widget_" + p.getAttrName().toLowerCase());
|
||||
icon = f.getInt(null);
|
||||
} catch(Exception e){
|
||||
}
|
||||
MapInfoControlRegInfo w = mapInfoControls.registerAppearanceWidget(icon, propertyName, "rend_"+p.getAttrName(), pref, categoryName);
|
||||
w.setStateChangeListener(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
|