Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2016-07-31 00:34:14 +02:00
commit e4f55a0ded
2 changed files with 38 additions and 19 deletions

View file

@ -1268,7 +1268,7 @@
- Download of country or region maps directly from the app
- Overlay of several map layers possible, like GPX or navigation tracks, Points of Interest, favorites, contour lines, public transport stops, additional maps with customizable transparency
- Offline search for addresses and places (POIs)
- Offline routing for short distances (experimental)
- Offline routing for medium-range distances
- Car, bicycle, and pedestrian modes with:
- optional automated day/night view switching
- optional speed-dependent map zooming
@ -1368,7 +1368,7 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
- Offline Wikipedia feature (download Wikipedia POIs), great for sightseeing
- Overlay of several map layers possible, like GPX or navigation tracks, Points of Interest, favorites, contour lines, public transport stops, additional maps with customizable transparency
- Offline search for addresses and places (POIs)
- Offline routing for short distances (experimental)
- Offline routing for medium-range distances
- Car, bicycle, and pedestrian modes with:
- optional automated day/night view switching
- optional speed-dependent map zooming
@ -1924,8 +1924,6 @@ If you need help with OsmAnd application, please contact our support team: suppo
<string name="reading_cached_tiles">Reading cached tiles…</string>
<string name="version_index_is_big_for_memory">The index \'\'{0}\'\' did not fit into memory</string>
<string name="version_index_is_not_supported">The version of index \'\'{0}\'\' is not supported</string>
<string name="use_osmand_routing_service">OsmAnd navigation &gt;20km</string>
<string name="use_osmand_routing_service_descr">Use OsmAnd offline navigation applies only to routes &gt; 20 km (experimental)</string>
<string name="osmand_routing_experimental">OsmAnd offline navigation is an experimental feature and it does not work for distances of more than about 20 km.\n\nNavigation service is temporarily switched to online CloudMade.</string>
<string name="specified_dir_doesnt_exist">Can not find the specified folder.</string>

View file

@ -587,30 +587,51 @@ public class ConfigureMapMenu {
}
}
if (prefs.size() > 0) {
final ItemClickListener clickListener = new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> a, int itemId, int pos,
boolean isChecked) {
if (!isChecked) {
for (int i = 0; i < prefs.size(); i++) {
prefs.get(i).set(false);
}
a.notifyDataSetInvalidated();
refreshMapComplete(activity);
activity.getMapLayers().updateLayers(activity.getMapView());
} else {
showPreferencesDialog(adapter, a, pos, activity, activity.getString(strId), ps, prefs,
useDescription);
}
return false;
}
};
ContextMenuItem.ItemBuilder builder = new ContextMenuItem.ItemBuilder()
.setTitleId(strId, activity)
.setIcon(icon)
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> a,
int itemId, int pos, boolean isChecked) {
if(!isChecked) {
for (int i = 0; i < prefs.size(); i++) {
prefs.get(i).set(false);
}
} else {
showPreferencesDialog(adapter, a, pos, activity, activity.getString(strId), ps, prefs, useDescription);
}
return false;
}
});
.setListener(clickListener);
if(useDescription) {
final String descr = getDescription(prefs);
builder.setDescription(descr);
builder.setLayout(R.layout.list_item_single_line_descrition_narrow);
} else {
boolean selected = false;
builder.setListener(new OnRowItemClick() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> a, int itemId, int pos, boolean isChecked) {
return clickListener.onContextMenuClick(a, itemId, pos, isChecked);
}
@Override
public boolean onRowItemClick(ArrayAdapter<ContextMenuItem> a, View view, int itemId,
int pos) {
showPreferencesDialog(adapter, a, pos, activity, activity.getString(strId), ps, prefs,
useDescription);
return false;
}
});
builder.setSecondaryIcon(R.drawable.ic_action_additional_option);
for(OsmandSettings.CommonPreference<Boolean> p : prefs) {
if(p.get()) {
selected = true;