Add icons

This commit is contained in:
Victor Shcherb 2012-08-27 02:01:01 +02:00
parent 0bacf1ccc9
commit b2a04ebe68
38 changed files with 16 additions and 9 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 932 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,021 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 970 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 877 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 961 B

View file

@ -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

View file

@ -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() {