Update controls and settings
This commit is contained in:
parent
2ed60e0914
commit
f0b67fcf6b
4 changed files with 34 additions and 27 deletions
|
@ -10,6 +10,7 @@
|
|||
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="map_widget_fluorescent">Fluorescent colors</string>
|
||||
<string name="map_widget_show_ruler">Ruler</string>
|
||||
<string name="map_widget_appearance">Appearance</string>
|
||||
<string name="map_widget_view_direction">View direction</string>
|
||||
<string name="map_widget_transparent">Transparent views</string>
|
||||
|
|
|
@ -1090,6 +1090,14 @@ public class MapActivity extends AccessibleActivity implements IMapLocationListe
|
|||
if(settings.ROTATE_MAP.get() != OsmandSettings.ROTATE_MAP_COMPASS){
|
||||
mapView.setRotate(0);
|
||||
}
|
||||
int resId = R.string.rotate_map_none_opt;
|
||||
if(settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_COMPASS){
|
||||
resId = R.string.rotate_map_compass_opt;
|
||||
} else if(settings.ROTATE_MAP.get() == OsmandSettings.ROTATE_MAP_BEARING){
|
||||
resId = R.string.rotate_map_bearing_opt;
|
||||
}
|
||||
|
||||
AccessibleToast.makeText(this, getString(resId), Toast.LENGTH_SHORT).show();
|
||||
mapView.refreshMap();
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@ public class OsmandExtraSettings extends OsmandPlugin {
|
|||
}
|
||||
@Override
|
||||
public void registerLayers(MapActivity activity) {
|
||||
if (registerControls) {
|
||||
registerControls = true;
|
||||
final OsmandMapTileView view = activity.getMapView();
|
||||
final MapInfoLayer mapInfoLayer = activity.getMapLayers().getMapInfoLayer();
|
||||
|
@ -78,7 +77,6 @@ public class OsmandExtraSettings extends OsmandPlugin {
|
|||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateLayers(final OsmandMapTileView view, MapActivity activity) {
|
||||
|
|
|
@ -232,7 +232,7 @@ public class MapInfoLayer extends OsmandMapLayer {
|
|||
|
||||
|
||||
private void registerAppearanceWidgets() {
|
||||
final MapInfoControlRegInfo showRuler = mapInfoControls.registerAppearanceWidget(0, R.string.map_widget_transparent,
|
||||
final MapInfoControlRegInfo showRuler = mapInfoControls.registerAppearanceWidget(0, R.string.map_widget_show_ruler,
|
||||
"showRuler", EnumSet.allOf(ApplicationMode.class));
|
||||
showRuler.setStateChangeListener(new Runnable() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue