Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2016-07-31 00:43:31 +02:00
commit 7cb66adf46
2 changed files with 18 additions and 20 deletions

View file

@ -2472,5 +2472,5 @@ Falls Sie OsmAnd mögen und das Projekt OpenStreetMap unterstützen wollen, so i
<string name="dist_away_from_my_location">Suche %1$s entfernt</string>
<string name="advanced_coords_search">Koordinatensuche (erweitert)</string>
<string name="coords_search">Koordinatensuche</string>
<string name="route_stops_before">%1$ s Haltestellen vor</string>
<string name="route_stops_before">%1$s Haltestellen vor</string>
</resources>

View file

@ -590,27 +590,25 @@ public class ConfigureMapMenu {
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;
boolean isChecked) {
if (!isChecked && !useDescription) {
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(clickListener);
if(useDescription) {
ContextMenuItem.ItemBuilder builder = new ContextMenuItem.ItemBuilder().setTitleId(strId, activity)
.setIcon(icon).setListener(clickListener);
if (useDescription) {
final String descr = getDescription(prefs);
builder.setDescription(descr);
builder.setLayout(R.layout.list_item_single_line_descrition_narrow);