Display ruler settings

This commit is contained in:
Victor Shcherb 2012-03-31 20:26:31 +02:00
parent bfb480109f
commit 838df611ae
5 changed files with 11 additions and 9 deletions

View file

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?> <?xml version="1.0" encoding="utf-8" standalone="no"?>
<resources> <resources>
<string name="show_ruler_level_descr">Display ruler on the map</string>
<string name="show_ruler_level">Display ruler</string>
<string name="rendering_out_of_memory">Not enough process memory to display selected area</string> <string name="rendering_out_of_memory">Not enough process memory to display selected area</string>
<string name="use_fluorescent_overlays">Fluorescent overlays</string> <string name="use_fluorescent_overlays">Fluorescent overlays</string>
<string name="use_fluorescent_overlays_descr">Use fluorescent colors to display tracks and routes</string> <string name="use_fluorescent_overlays_descr">Use fluorescent colors to display tracks and routes</string>
@ -123,8 +126,7 @@
<string name="download_files_not_enough_space">There is not enough free space to download %1$s MB (free: %2$s).</string> <string name="download_files_not_enough_space">There is not enough free space to download %1$s MB (free: %2$s).</string>
<string name="download_files_question_space">Free space now {2} MB! Download {0} file(s) ({1} MB)?</string> <string name="download_files_question_space">Free space now {2} MB! Download {0} file(s) ({1} MB)?</string>
<string name="show_zoom_level_descr">Permanently show zoom level instead of ruler.</string>
<string name="show_zoom_level">Show zoom level</string>
<string name="tip_select_destination_point">Select Destination</string> <string name="tip_select_destination_point">Select Destination</string>
<string name="tip_select_destination_point_t">\tYou can select a destination directly in the map (context menu, then \'Set as destination\'), in all search activities, or via long pressing an entry in your \'List of Favorite Points\'. <string name="tip_select_destination_point_t">\tYou can select a destination directly in the map (context menu, then \'Set as destination\'), in all search activities, or via long pressing an entry in your \'List of Favorite Points\'.
\n\tThe destination is marked as an orange disk on the map and OsmAnd displays the distance to it and the direction to it (orange triangle).</string> \n\tThe destination is marked as an orange disk on the map and OsmAnd displays the distance to it and the direction to it (orange triangle).</string>
@ -734,7 +736,7 @@
<string name="favourites_activity">Favorites</string> <string name="favourites_activity">Favorites</string>
<string name="add_to_favourite">Add to Favorites</string> <string name="add_to_favourite">Add to Favorites</string>
<string name="use_english_names_descr">Select between native and English names</string> <string name="use_english_names_descr">Select between native and English names</string>
<string name="use_english_names">Use english names</string> <string name="use_english_names">Use English names</string>
<string name="app_settings">Application settings</string> <string name="app_settings">Application settings</string>
<string name="search_address">Search address</string> <string name="search_address">Search address</string>
<string name="choose_building">Choose building</string> <string name="choose_building">Choose building</string>
@ -744,7 +746,7 @@
<string name="position_on_map_descr">Choose location of position marker on the map</string> <string name="position_on_map_descr">Choose location of position marker on the map</string>
<string name="position_on_map">Position marker</string> <string name="position_on_map">Position marker</string>
<string name="map_specify_point">Set as destination</string> <string name="map_specify_point">Set as destination</string>
<string name="show_view_angle_descr">Display viewing direction based on compass</string> <string name="show_view_angle_descr">Display viewing direction on the map</string>
<string name="show_view_angle">Display viewing direction</string> <string name="show_view_angle">Display viewing direction</string>
<string name="stop_navigation">Clear destin.</string> <string name="stop_navigation">Clear destin.</string>
<string name="navigate_to_point">Set as dest.</string> <string name="navigate_to_point">Set as dest.</string>

View file

@ -47,7 +47,7 @@
<CheckBoxPreference android:key="show_altitude_info" android:title="@string/show_altitude_info" android:summary="@string/show_altitude_info_descr"/> <CheckBoxPreference android:key="show_altitude_info" android:title="@string/show_altitude_info" android:summary="@string/show_altitude_info_descr"/>
<CheckBoxPreference android:key="transparent_map_theme" android:title="@string/use_transparent_map_theme" android:summary="@string/use_transparent_map_theme_descr"/> <CheckBoxPreference android:key="transparent_map_theme" android:title="@string/use_transparent_map_theme" android:summary="@string/use_transparent_map_theme_descr"/>
<CheckBoxPreference android:key="fluorescent_overlays" android:title="@string/use_fluorescent_overlays" android:summary="@string/use_fluorescent_overlays_descr"/> <CheckBoxPreference android:key="fluorescent_overlays" android:title="@string/use_fluorescent_overlays" android:summary="@string/use_fluorescent_overlays_descr"/>
<CheckBoxPreference android:key="show_zoom_level" android:title="@string/show_zoom_level" android:summary="@string/show_zoom_level_descr"/> <CheckBoxPreference android:key="show_ruler" android:title="@string/show_ruler_level" android:summary="@string/show_ruler_level_descr"/>
</PreferenceScreen> </PreferenceScreen>

View file

@ -1115,8 +1115,8 @@ public class OsmandSettings {
SHOW_ALTITUDE_INFO.setModeDefaultValue(ApplicationMode.CAR, false); SHOW_ALTITUDE_INFO.setModeDefaultValue(ApplicationMode.CAR, false);
} }
public final CommonPreference<Boolean> SHOW_ZOOM_LEVEL = public final CommonPreference<Boolean> SHOW_RULER =
new BooleanPreference("show_zoom_level", false, false, true); new BooleanPreference("show_ruler", true, false, true);
public final OsmandPreference<Integer> NUMBER_OF_FREE_DOWNLOADS = public final OsmandPreference<Integer> NUMBER_OF_FREE_DOWNLOADS =

View file

@ -189,7 +189,7 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
registerBooleanPreference(osmandSettings.TEST_ANIMATE_ROUTING,screen); registerBooleanPreference(osmandSettings.TEST_ANIMATE_ROUTING,screen);
registerBooleanPreference(osmandSettings.SHOW_ALTITUDE_INFO,screen); registerBooleanPreference(osmandSettings.SHOW_ALTITUDE_INFO,screen);
registerBooleanPreference(osmandSettings.FLUORESCENT_OVERLAYS,screen); registerBooleanPreference(osmandSettings.FLUORESCENT_OVERLAYS,screen);
registerBooleanPreference(osmandSettings.SHOW_ZOOM_LEVEL,screen); registerBooleanPreference(osmandSettings.SHOW_RULER,screen);
CheckBoxPreference nativeCheckbox = registerBooleanPreference(osmandSettings.NATIVE_RENDERING,screen); CheckBoxPreference nativeCheckbox = registerBooleanPreference(osmandSettings.NATIVE_RENDERING,screen);
//disable the checkbox if the library cannot be used //disable the checkbox if the library cannot be used
if (NativeOsmandLibrary.isLoaded() && !NativeOsmandLibrary.isSupported()) { if (NativeOsmandLibrary.isLoaded() && !NativeOsmandLibrary.isSupported()) {

View file

@ -124,7 +124,7 @@ public class MapControlsLayer extends OsmandMapLayer {
hideZoomLevelInTime(); hideZoomLevelInTime();
} }
} }
if (showZoomLevel || view.getSettings().SHOW_ZOOM_LEVEL.get()) { if (showZoomLevel || !view.getSettings().SHOW_RULER.get()) {
drawZoomLevel(canvas); drawZoomLevel(canvas);
} else { } else {
drawRuler(canvas); drawRuler(canvas);